Fixed some missing return statements.

This commit is contained in:
Kees van Reeuwijk 2010-01-11 14:22:29 +00:00
parent 2baf34f801
commit f595416e7f
5 changed files with 19 additions and 8 deletions

View file

@ -59,7 +59,7 @@ static int do_del_phys(message *m);
static int do_add4pci(message *m); static int do_add4pci(message *m);
static void add_range(u32_t busaddr, u32_t size); static void add_range(u32_t busaddr, u32_t size);
static void del_range(u32_t busaddr, u32_t size); static void del_range(u32_t busaddr, u32_t size);
static int do_pm_notify(message *m); static void do_pm_notify(message *m);
static void report_exceptions(void); static void report_exceptions(void);
/* SEF functions and variables. */ /* SEF functions and variables. */
@ -158,6 +158,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
return(OK); return(OK);
} }
/* Returns 0 if no device found, or 1 if a device is found. */
static int find_dev(devindp, capaddrp) static int find_dev(devindp, capaddrp)
int *devindp; int *devindp;
u8_t *capaddrp; u8_t *capaddrp;
@ -178,7 +179,7 @@ u8_t *capaddrp;
if (!r) if (!r)
{ {
printf("amddev`find_dev: no first dev\n"); printf("amddev`find_dev: no first dev\n");
return; return 0;
} }
} }
else else
@ -187,7 +188,7 @@ u8_t *capaddrp;
if (!r) if (!r)
{ {
printf("amddev`find_dev: no next dev\n"); printf("amddev`find_dev: no next dev\n");
return; return 0;
} }
} }
@ -485,7 +486,7 @@ static void del_range(u32_t busaddr, u32_t size)
} }
} }
static int do_pm_notify(message *m) static void do_pm_notify(message *m)
{ {
int r; int r;
endpoint_t proc_e; endpoint_t proc_e;

View file

@ -103,6 +103,8 @@ PUBLIC int drv_init(void) {
special_file[3].write_chan = DAC2_CHAN; special_file[3].write_chan = DAC2_CHAN;
special_file[3].read_chan = NO_CHANNEL; special_file[3].read_chan = NO_CHANNEL;
special_file[3].io_ctl = DAC2_CHAN; special_file[3].io_ctl = DAC2_CHAN;
return OK;
} }
@ -267,6 +269,7 @@ int drv_start(int sub_dev, int DmaMode) {
int drv_stop(int sub_dev) int drv_stop(int sub_dev)
{ {
u32_t enable_bit; u32_t enable_bit;
int status;
switch(sub_dev) { switch(sub_dev) {
case ADC1_CHAN: enable_bit = ADC1_EN;break; case ADC1_CHAN: enable_bit = ADC1_EN;break;
@ -279,9 +282,9 @@ int drv_stop(int sub_dev)
pci_outw(reg(CHIP_SEL_CTRL), pci_outw(reg(CHIP_SEL_CTRL),
pci_inw(reg(CHIP_SEL_CTRL)) & ~enable_bit); pci_inw(reg(CHIP_SEL_CTRL)) & ~enable_bit);
aud_conf[sub_dev].busy = 0; aud_conf[sub_dev].busy = 0;
disable_int(sub_dev); status = disable_int(sub_dev);
return OK; return status;
} }
@ -321,7 +324,7 @@ int drv_io_ctl(int request, void * val, int * len, int sub_dev) {
status = EINVAL; break; status = EINVAL; break;
} }
return OK; return status;
} }
@ -593,6 +596,7 @@ PRIVATE int disable_int(int chan) {
/* clear the interrupt */ /* clear the interrupt */
ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL)); ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL));
pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit); pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit);
return OK;
} }

View file

@ -109,6 +109,8 @@ PUBLIC int drv_init(void) {
special_file[3].write_chan = DAC2_CHAN; special_file[3].write_chan = DAC2_CHAN;
special_file[3].read_chan = NO_CHANNEL; special_file[3].read_chan = NO_CHANNEL;
special_file[3].io_ctl = DAC2_CHAN; special_file[3].io_ctl = DAC2_CHAN;
return OK;
} }
@ -324,7 +326,7 @@ int drv_io_ctl(int request, void * val, int * len, int sub_dev) {
status = EINVAL; break; status = EINVAL; break;
} }
return OK; return status;
} }
@ -597,6 +599,7 @@ PRIVATE int disable_int(int chan) {
/* clear the interrupt */ /* clear the interrupt */
ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL)); ser_interface = pci_inw(reg(SERIAL_INTERFACE_CTRL));
pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit); pci_outw(reg(SERIAL_INTERFACE_CTRL), ser_interface & ~int_en_bit);
return OK;
} }

View file

@ -403,6 +403,7 @@ PRIVATE int close_sub_dev(int sub_dev_nr) {
/* free the buffers */ /* free the buffers */
free(sub_dev_ptr->DmaBuf); free(sub_dev_ptr->DmaBuf);
free(sub_dev_ptr->ExtraBuf); free(sub_dev_ptr->ExtraBuf);
return OK;
} }

View file

@ -67,6 +67,8 @@ PUBLIC int drv_init(void) {
special_file[2].write_chan = NO_CHANNEL; special_file[2].write_chan = NO_CHANNEL;
special_file[2].read_chan = NO_CHANNEL; special_file[2].read_chan = NO_CHANNEL;
special_file[2].io_ctl = MIXER; special_file[2].io_ctl = MIXER;
return OK;
} }