staging: comedi: drivers: return '0' for successful attach

The comedi core expects the driver attach functions to return a
negative errno for failure. Any other value indicates success.

For consistency in the drivers, make sure they all return '0' to
indicate success.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2014-02-03 11:26:51 -07:00 committed by Greg Kroah-Hartman
parent c93999c213
commit fb780d2133
6 changed files with 6 additions and 6 deletions

View File

@ -98,7 +98,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
s->range_table = &range_digital;
s->insn_bits = aio_iiro_16_dio_insn_bits_read;
return 1;
return 0;
}
static struct comedi_driver aio_iiro_16_driver = {

View File

@ -159,7 +159,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* function to call when reading DA */
s->insn_read = fl512_ao_insn_readback;
return 1;
return 0;
}
static struct comedi_driver fl512_driver = {

View File

@ -773,7 +773,7 @@ static int jr3_pci_auto_attach(struct comedi_device *dev,
devpriv->timer.expires = jiffies + msecs_to_jiffies(1000);
add_timer(&devpriv->timer);
return result;
return 0;
}
static void jr3_pci_detach(struct comedi_device *dev)

View File

@ -341,7 +341,7 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->len_chanlist = 1;
s->insn_read = mpc624_ai_rinsn;
return 1;
return 0;
}
static struct comedi_driver mpc624_driver = {

View File

@ -1551,7 +1551,7 @@ static int pcimio_auto_attach(struct comedi_device *dev,
dev->subdevices[NI_GPCT_SUBDEV(1)].buf_change = &pcimio_gpct1_change;
dev->subdevices[NI_DIO_SUBDEV].buf_change = &pcimio_dio_change;
return ret;
return 0;
}
static int pcimio_ai_change(struct comedi_device *dev,

View File

@ -604,7 +604,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->insn_bits = s526_dio_insn_bits;
s->insn_config = s526_dio_insn_config;
return 1;
return 0;
}
static struct comedi_driver s526_driver = {