Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb780d21 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c93999c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
+1 −1
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
+1 −1
Original line number Diff line number Diff line
@@ -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,
Loading