From fb780d213355868b69cc12142635aae5e0ee7c2a Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Mon, 3 Feb 2014 11:26:51 -0700 Subject: [PATCH] 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_iiro_16.c | 2 +- drivers/staging/comedi/drivers/fl512.c | 2 +- drivers/staging/comedi/drivers/jr3_pci.c | 2 +- drivers/staging/comedi/drivers/mpc624.c | 2 +- drivers/staging/comedi/drivers/ni_pcimio.c | 2 +- drivers/staging/comedi/drivers/s526.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c index 22b3dda135ff..781104aa533e 100644 --- a/drivers/staging/comedi/drivers/aio_iiro_16.c +++ b/drivers/staging/comedi/drivers/aio_iiro_16.c @@ -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 = { diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c index a99ddf00ddc4..a5562ea2806f 100644 --- a/drivers/staging/comedi/drivers/fl512.c +++ b/drivers/staging/comedi/drivers/fl512.c @@ -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 = { diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index 6100c12c164f..73ef31ebc05d 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -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) diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index fe4621ea65c3..59ad8391cdc8 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c @@ -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 = { diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index 0ed980455875..d40df072583c 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -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, diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 9950f59b1192..0a93afab3dcb 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -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 = { -- 2.20.1