Commit eea6838b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: remove the "Allocate the subdevice..." comments

These comments are redundant. The function name 'comedi_alloc_subdevices'
provides this information.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <ian@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0e4039f3
...@@ -1686,7 +1686,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1686,7 +1686,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->s_BoardInfos.ui_Address = io_addr[2]; devpriv->s_BoardInfos.ui_Address = io_addr[2];
#endif #endif
} else { } else {
/* Update-0.7.57->0.7.68dev->n_subdevices = 7; */
n_subdevices = 7; n_subdevices = 7;
ret = comedi_alloc_subdevices(dev, n_subdevices); ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0) if (ret < 0)
......
...@@ -62,7 +62,6 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev) ...@@ -62,7 +62,6 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
int ret = 0; int ret = 0;
int n_subdevices = 9; int n_subdevices = 9;
/* Update-0.7.57->0.7.68dev->n_subdevices = 9; */
ret = comedi_alloc_subdevices(dev, n_subdevices); ret = comedi_alloc_subdevices(dev, n_subdevices);
if (ret < 0) if (ret < 0)
return; return;
......
...@@ -267,10 +267,6 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -267,10 +267,6 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->last_channel = -1; devpriv->last_channel = -1;
devpriv->last_range = -1; devpriv->last_range = -1;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -1379,7 +1379,6 @@ static int pci224_attach_common(struct comedi_device *dev, ...@@ -1379,7 +1379,6 @@ static int pci224_attach_common(struct comedi_device *dev,
outw(devpriv->daccon | PCI224_DACCON_FIFORESET, outw(devpriv->daccon | PCI224_DACCON_FIFORESET,
dev->iobase + PCI224_DACCON); dev->iobase + PCI224_DACCON);
/* Allocate subdevices. There is only one! */
ret = comedi_alloc_subdevices(dev, 1); ret = comedi_alloc_subdevices(dev, 1);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
...@@ -2839,10 +2839,7 @@ static int pci230_attach_common(struct comedi_device *dev, ...@@ -2839,10 +2839,7 @@ static int pci230_attach_common(struct comedi_device *dev,
dev_dbg(dev->class_dev, "registered irq %u\n", dev_dbg(dev->class_dev, "registered irq %u\n",
devpriv->pci_dev->irq); devpriv->pci_dev->irq);
} }
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
s = dev->subdevices + 0; s = dev->subdevices + 0;
......
...@@ -433,7 +433,6 @@ static int c6xdigio_attach(struct comedi_device *dev, ...@@ -433,7 +433,6 @@ static int c6xdigio_attach(struct comedi_device *dev,
dev->iobase = iobase; dev->iobase = iobase;
dev->board_name = "c6xdigio"; dev->board_name = "c6xdigio";
/* 3 subdevices with encoder_init write */
result = comedi_alloc_subdevices(dev, 2); result = comedi_alloc_subdevices(dev, 2);
if (result < 0) if (result < 0)
return result; return result;
......
...@@ -614,9 +614,6 @@ static int cb_pcidas_attach(struct comedi_device *dev, ...@@ -614,9 +614,6 @@ static int cb_pcidas_attach(struct comedi_device *dev,
/* Initialize dev->board_name */ /* Initialize dev->board_name */
dev->board_name = thisboard->name; dev->board_name = thisboard->name;
/*
* Allocate the subdevice structures.
*/
if (comedi_alloc_subdevices(dev, 7) < 0) if (comedi_alloc_subdevices(dev, 7) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -333,9 +333,6 @@ static int cb_pcidda_attach(struct comedi_device *dev, ...@@ -333,9 +333,6 @@ static int cb_pcidda_attach(struct comedi_device *dev,
*/ */
dev->board_name = thisboard->name; dev->board_name = thisboard->name;
/*
* Allocate the subdevice structures.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -177,10 +177,6 @@ static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -177,10 +177,6 @@ static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
pci_resource_start(devpriv->pci_dev, pci_resource_start(devpriv->pci_dev,
pcidio_boards[index].dioregs_badrindex); pcidio_boards[index].dioregs_badrindex);
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, thisboard->n_8255) < 0) if (comedi_alloc_subdevices(dev, thisboard->n_8255) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -269,10 +269,6 @@ static int cb_pcimdas_attach(struct comedi_device *dev, ...@@ -269,10 +269,6 @@ static int cb_pcimdas_attach(struct comedi_device *dev,
/* Initialize dev->board_name */ /* Initialize dev->board_name */
dev->board_name = thisboard->name; dev->board_name = thisboard->name;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -236,10 +236,6 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -236,10 +236,6 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
*/ */
dev->board_name = thisboard->name; dev->board_name = thisboard->name;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 2) < 0) if (comedi_alloc_subdevices(dev, 2) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -358,10 +358,6 @@ static int bonding_attach(struct comedi_device *dev, ...@@ -358,10 +358,6 @@ static int bonding_attach(struct comedi_device *dev,
*/ */
dev->board_name = devpriv->name; dev->board_name = devpriv->name;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 1) < 0) if (comedi_alloc_subdevices(dev, 1) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -371,10 +371,6 @@ static int dmm32at_attach(struct comedi_device *dev, ...@@ -371,10 +371,6 @@ static int dmm32at_attach(struct comedi_device *dev,
if (alloc_private(dev, sizeof(struct dmm32at_private)) < 0) if (alloc_private(dev, sizeof(struct dmm32at_private)) < 0)
return -ENOMEM; return -ENOMEM;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -1035,7 +1035,6 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1035,7 +1035,6 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->serial = it->options[0]; devpriv->serial = it->options[0];
/* Allocate subdevices */
if (comedi_alloc_subdevices(dev, 4) < 0) if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -189,7 +189,6 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -189,7 +189,6 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
io_base = pci_resource_start(pci_device, 0); io_base = pci_resource_start(pci_device, 0);
dev->iobase = io_base; dev->iobase = io_base;
/* allocate the subdevice structures */
error = comedi_alloc_subdevices(dev, 1); error = comedi_alloc_subdevices(dev, 1);
if (error < 0) if (error < 0)
return error; return error;
......
...@@ -2190,11 +2190,6 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -2190,11 +2190,6 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (result) if (result)
return result; return result;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h. It relies on
* n_subdevices being set correctly.
*/
if (comedi_alloc_subdevices(dev, 4) < 0) if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -348,7 +348,6 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -348,7 +348,6 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz; devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz;
} }
/* Subdevices structures */
if (comedi_alloc_subdevices(dev, 1) < 0) if (comedi_alloc_subdevices(dev, 1) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -190,13 +190,6 @@ static int pcmda12_attach(struct comedi_device *dev, ...@@ -190,13 +190,6 @@ static int pcmda12_attach(struct comedi_device *dev,
devpriv->simultaneous_xfer_mode = it->options[1]; devpriv->simultaneous_xfer_mode = it->options[1];
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
* 96-channel version of the board.
*/
if (comedi_alloc_subdevices(dev, 1) < 0) if (comedi_alloc_subdevices(dev, 1) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -1071,12 +1071,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1071,12 +1071,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev->minor); dev->minor);
return -ENOMEM; return -ENOMEM;
} }
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*
* Allocate 1 AI + 1 AO + 2 DIO subdevs (24 lines per DIO)
*/
if (comedi_alloc_subdevices(dev, n_subdevs) < 0) if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -800,13 +800,7 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -800,13 +800,7 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
dev_warn(dev->hw_dev, "cannot allocate subdevice private data structures\n"); dev_warn(dev->hw_dev, "cannot allocate subdevice private data structures\n");
return -ENOMEM; return -ENOMEM;
} }
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
* 96-channel version of the board.
*/
if (comedi_alloc_subdevices(dev, n_subdevs) < 0) if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -1999,10 +1999,6 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -1999,10 +1999,6 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* Show board configuration */ /* Show board configuration */
printk(KERN_INFO "%s:", dev->board_name); printk(KERN_INFO "%s:", dev->board_name);
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 4) < 0) if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -774,10 +774,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -774,10 +774,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (alloc_private(dev, sizeof(struct s526_private)) < 0) if (alloc_private(dev, sizeof(struct s526_private)) < 0)
return -ENOMEM; return -ENOMEM;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 4) < 0) if (comedi_alloc_subdevices(dev, 4) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -233,10 +233,6 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -233,10 +233,6 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (alloc_private(dev, sizeof(struct skel_private)) < 0) if (alloc_private(dev, sizeof(struct skel_private)) < 0)
return -ENOMEM; return -ENOMEM;
/*
* Allocate the subdevice structures. alloc_subdevice() is a
* convenient macro defined in comedidev.h.
*/
if (comedi_alloc_subdevices(dev, 3) < 0) if (comedi_alloc_subdevices(dev, 3) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -197,9 +197,6 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -197,9 +197,6 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (alloc_private(dev, sizeof(struct dnp_private_data)) < 0) if (alloc_private(dev, sizeof(struct dnp_private_data)) < 0)
return -ENOMEM; return -ENOMEM;
/* Allocate the subdevice structures. alloc_subdevice() is a */
/* convenient macro defined in comedidev.h. */
if (comedi_alloc_subdevices(dev, 1) < 0) if (comedi_alloc_subdevices(dev, 1) < 0)
return -ENOMEM; return -ENOMEM;
......
...@@ -2645,7 +2645,6 @@ static int usbdux_attach_common(struct comedi_device *dev, ...@@ -2645,7 +2645,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
n_subdevs = 4; n_subdevs = 4;
} }
/* allocate space for the subdevices */
ret = comedi_alloc_subdevices(dev, n_subdevs); ret = comedi_alloc_subdevices(dev, n_subdevs);
if (ret < 0) { if (ret < 0) {
up(&udev->sem); up(&udev->sem);
......
...@@ -1666,7 +1666,6 @@ static int usbduxfast_attach(struct comedi_device *dev, ...@@ -1666,7 +1666,6 @@ static int usbduxfast_attach(struct comedi_device *dev,
dev->board_name = BOARDNAME; dev->board_name = BOARDNAME;
/* allocate space for the subdevices */
ret = comedi_alloc_subdevices(dev, 1); ret = comedi_alloc_subdevices(dev, 1);
if (ret < 0) { if (ret < 0) {
up(&(usbduxfastsub[index].sem)); up(&(usbduxfastsub[index].sem));
......
...@@ -2690,7 +2690,6 @@ static int usbduxsigma_attach(struct comedi_device *dev, ...@@ -2690,7 +2690,6 @@ static int usbduxsigma_attach(struct comedi_device *dev,
n_subdevs = 3; n_subdevs = 3;
} }
/* allocate space for the subdevices */
ret = comedi_alloc_subdevices(dev, n_subdevs); ret = comedi_alloc_subdevices(dev, n_subdevs);
if (ret < 0) { if (ret < 0) {
up(&udev->sem); up(&udev->sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment