]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: comedi: drivers: return '0' for successful attach
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 3 Feb 2014 18:26:51 +0000 (11:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Feb 2014 18:49:47 +0000 (10:49 -0800)
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>
drivers/staging/comedi/drivers/aio_iiro_16.c
drivers/staging/comedi/drivers/fl512.c
drivers/staging/comedi/drivers/jr3_pci.c
drivers/staging/comedi/drivers/mpc624.c
drivers/staging/comedi/drivers/ni_pcimio.c
drivers/staging/comedi/drivers/s526.c

index 22b3dda135ff23a9b7ff351bba8c578227e90353..781104aa533efd35f3338f35001627f24a381df8 100644 (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 = {
index a99ddf00ddc44a466a1e1b6b89db6cdf4207018a..a5562ea2806f52fba7ee34f12e4a0a4ed0250d91 100644 (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 = {
index 6100c12c164f4c697bf21ebfb85727966a3dd23f..73ef31ebc05dff80105612e5a84c3cb4a313dc7a 100644 (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)
index fe4621ea65c356274561f71e6c834251be9debe4..59ad8391cdc8e183fa2aa0ce95166aeb3f787048 100644 (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 = {
index 0ed9804558753a51022394b1e7d8599aadcdae90..d40df072583cba425d5d84b71bfd291d295d0a47 100644 (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,
index 9950f59b1192c99dc471265027dbb2a9fd26fc4a..0a93afab3dcb505e1cb873b08429c2c1f4b93c77 100644 (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 = {