staging: comedi: remove the comed_alloc_subdevices "allocation failed" messages
Remove all the "allocation failed" debug messages that are displayed when the comedi_alloc_subdevices call fails. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbot <abbott@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fba1d0faf7
commit
0e4039f311
14 changed files with 10 additions and 41 deletions
|
@ -389,12 +389,8 @@ static int dev_8255_attach(struct comedi_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = comedi_alloc_subdevices(dev, i);
|
ret = comedi_alloc_subdevices(dev, i);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
/* FIXME this printk call should give a proper message, the
|
|
||||||
* below line just maintains previous functionality */
|
|
||||||
printk("comedi%d: 8255:", dev->minor);
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
printk(KERN_INFO "comedi%d: 8255:", dev->minor);
|
printk(KERN_INFO "comedi%d: 8255:", dev->minor);
|
||||||
|
|
||||||
|
|
|
@ -366,10 +366,8 @@ static int pci1723_attach(struct comedi_device *dev,
|
||||||
n_subdevices++;
|
n_subdevices++;
|
||||||
|
|
||||||
ret = comedi_alloc_subdevices(dev, n_subdevices);
|
ret = comedi_alloc_subdevices(dev, n_subdevices);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
printk(" - Allocation failed!\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
pci1723_reset(dev);
|
pci1723_reset(dev);
|
||||||
subdev = 0;
|
subdev = 0;
|
||||||
|
|
|
@ -1274,10 +1274,8 @@ static int dio200_common_attach(struct comedi_device *dev, unsigned long iobase,
|
||||||
dev->iobase = iobase;
|
dev->iobase = iobase;
|
||||||
dev->board_name = thisboard->name;
|
dev->board_name = thisboard->name;
|
||||||
ret = comedi_alloc_subdevices(dev, layout->n_subdevs);
|
ret = comedi_alloc_subdevices(dev, layout->n_subdevs);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(dev->class_dev, "error! out of memory!\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
for (n = 0; n < dev->n_subdevices; n++) {
|
for (n = 0; n < dev->n_subdevices; n++) {
|
||||||
s = &dev->subdevices[n];
|
s = &dev->subdevices[n];
|
||||||
switch (layout->sdtype[n]) {
|
switch (layout->sdtype[n]) {
|
||||||
|
|
|
@ -456,10 +456,8 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
|
||||||
dev->iobase = iobase;
|
dev->iobase = iobase;
|
||||||
|
|
||||||
ret = comedi_alloc_subdevices(dev, 2);
|
ret = comedi_alloc_subdevices(dev, 2);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(dev->class_dev, "error! out of memory!\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
s = dev->subdevices + 0;
|
s = dev->subdevices + 0;
|
||||||
/* digital i/o subdevice (8255) */
|
/* digital i/o subdevice (8255) */
|
||||||
|
|
|
@ -228,10 +228,8 @@ static int pc263_common_attach(struct comedi_device *dev, unsigned long iobase)
|
||||||
dev->iobase = iobase;
|
dev->iobase = iobase;
|
||||||
|
|
||||||
ret = comedi_alloc_subdevices(dev, 1);
|
ret = comedi_alloc_subdevices(dev, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(dev->class_dev, "error! out of memory!\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
s = dev->subdevices + 0;
|
s = dev->subdevices + 0;
|
||||||
/* digital output subdevice */
|
/* digital output subdevice */
|
||||||
|
|
|
@ -1381,10 +1381,8 @@ static int pci224_attach_common(struct comedi_device *dev,
|
||||||
|
|
||||||
/* Allocate subdevices. There is only one! */
|
/* Allocate subdevices. There is only one! */
|
||||||
ret = comedi_alloc_subdevices(dev, 1);
|
ret = comedi_alloc_subdevices(dev, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
dev_err(dev->class_dev, "error! out of memory!\n");
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
|
||||||
|
|
||||||
s = dev->subdevices + 0;
|
s = dev->subdevices + 0;
|
||||||
/* Analog output subdevice. */
|
/* Analog output subdevice. */
|
||||||
|
|
|
@ -330,8 +330,6 @@ found:
|
||||||
devpriv->BADR5 = pci_resource_start(pcidev, 5);
|
devpriv->BADR5 = pci_resource_start(pcidev, 5);
|
||||||
|
|
||||||
if (comedi_alloc_subdevices(dev, 4) < 0) {
|
if (comedi_alloc_subdevices(dev, 4) < 0) {
|
||||||
printk(KERN_ERR "comedi: dyna_pci10xx: "
|
|
||||||
"failed allocating subdevices\n");
|
|
||||||
mutex_unlock(&start_stop_sem);
|
mutex_unlock(&start_stop_sem);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,10 +197,8 @@ static int pcmda12_attach(struct comedi_device *dev,
|
||||||
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
|
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
|
||||||
* 96-channel version of the board.
|
* 96-channel version of the board.
|
||||||
*/
|
*/
|
||||||
if (comedi_alloc_subdevices(dev, 1) < 0) {
|
if (comedi_alloc_subdevices(dev, 1) < 0)
|
||||||
printk(KERN_ERR "cannot allocate subdevice data structures\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
s = dev->subdevices;
|
s = dev->subdevices;
|
||||||
s->private = NULL;
|
s->private = NULL;
|
||||||
|
|
|
@ -1077,11 +1077,8 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||||
*
|
*
|
||||||
* Allocate 1 AI + 1 AO + 2 DIO subdevs (24 lines per DIO)
|
* 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)
|
||||||
printk(KERN_ERR "comedi%d: cannot allocate subdevice data structures\n",
|
|
||||||
dev->minor);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
/* First, AI */
|
/* First, AI */
|
||||||
sdev_no = 0;
|
sdev_no = 0;
|
||||||
|
|
|
@ -807,10 +807,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||||
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
|
* Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
|
||||||
* 96-channel version of the board.
|
* 96-channel version of the board.
|
||||||
*/
|
*/
|
||||||
if (comedi_alloc_subdevices(dev, n_subdevs) < 0) {
|
if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
|
||||||
dev_dbg(dev->hw_dev, "cannot allocate subdevice data structures\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
port = 0;
|
port = 0;
|
||||||
asic = 0;
|
asic = 0;
|
||||||
|
|
|
@ -468,10 +468,8 @@ static int unioxx5_attach(struct comedi_device *dev,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (comedi_alloc_subdevices(dev, n_subd) < 0) {
|
if (comedi_alloc_subdevices(dev, n_subd) < 0)
|
||||||
printk(KERN_ERR "out of memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
/* initializing each of for same subdevices */
|
/* initializing each of for same subdevices */
|
||||||
for (i = 0; i < n_subd; i++, iobase += UNIOXX5_SUBDEV_ODDS) {
|
for (i = 0; i < n_subd; i++, iobase += UNIOXX5_SUBDEV_ODDS) {
|
||||||
|
|
|
@ -2648,8 +2648,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
|
||||||
/* allocate space for the subdevices */
|
/* 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) {
|
||||||
dev_err(&udev->interface->dev,
|
|
||||||
"comedi%d: error alloc space for subdev\n", dev->minor);
|
|
||||||
up(&udev->sem);
|
up(&udev->sem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1669,8 +1669,6 @@ static int usbduxfast_attach(struct comedi_device *dev,
|
||||||
/* allocate space for the subdevices */
|
/* allocate space for the subdevices */
|
||||||
ret = comedi_alloc_subdevices(dev, 1);
|
ret = comedi_alloc_subdevices(dev, 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk(KERN_ERR "comedi%d: usbduxfast: error alloc space for "
|
|
||||||
"subdev\n", dev->minor);
|
|
||||||
up(&(usbduxfastsub[index].sem));
|
up(&(usbduxfastsub[index].sem));
|
||||||
up(&start_stop_sem);
|
up(&start_stop_sem);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -2693,8 +2693,6 @@ static int usbduxsigma_attach(struct comedi_device *dev,
|
||||||
/* allocate space for the subdevices */
|
/* 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) {
|
||||||
dev_err(&udev->interface->dev,
|
|
||||||
"comedi%d: no space for subdev\n", dev->minor);
|
|
||||||
up(&udev->sem);
|
up(&udev->sem);
|
||||||
up(&start_stop_sem);
|
up(&start_stop_sem);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue