]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
staging: comedi: remove the comed_alloc_subdevices "allocation failed" messages
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 12 Jun 2012 18:58:45 +0000 (11:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jun 2012 21:44:03 +0000 (14:44 -0700)
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>
14 files changed:
drivers/staging/comedi/drivers/8255.c
drivers/staging/comedi/drivers/adv_pci1723.c
drivers/staging/comedi/drivers/amplc_dio200.c
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/amplc_pc263.c
drivers/staging/comedi/drivers/amplc_pci224.c
drivers/staging/comedi/drivers/dyna_pci10xx.c
drivers/staging/comedi/drivers/pcmda12.c
drivers/staging/comedi/drivers/pcmmio.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/unioxx5.c
drivers/staging/comedi/drivers/usbdux.c
drivers/staging/comedi/drivers/usbduxfast.c
drivers/staging/comedi/drivers/usbduxsigma.c

index 875b020217774e0d5853b93d1fa8677a7f4d1eb9..64b00547228bef85eb4616efdcbc494bc0d037ed 100644 (file)
@@ -389,12 +389,8 @@ static int dev_8255_attach(struct comedi_device *dev,
        }
 
        ret = comedi_alloc_subdevices(dev, i);
-       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);
+       if (ret < 0)
                return ret;
-       }
 
        printk(KERN_INFO "comedi%d: 8255:", dev->minor);
 
index 0aa0af4741a58c934db64a002c8608e894e00ef5..c14ad35cb835834a993284a443079e74c8f17eb5 100644 (file)
@@ -366,10 +366,8 @@ static int pci1723_attach(struct comedi_device *dev,
                n_subdevices++;
 
        ret = comedi_alloc_subdevices(dev, n_subdevices);
-       if (ret < 0) {
-               printk(" - Allocation failed!\n");
+       if (ret < 0)
                return ret;
-       }
 
        pci1723_reset(dev);
        subdev = 0;
index d7d056e20c0297ceef551b7ac7e326dbce66cbcc..17d3489b7f98fea940298abdd265db0f5730d049 100644 (file)
@@ -1274,10 +1274,8 @@ static int dio200_common_attach(struct comedi_device *dev, unsigned long iobase,
        dev->iobase = iobase;
        dev->board_name = thisboard->name;
        ret = comedi_alloc_subdevices(dev, layout->n_subdevs);
-       if (ret < 0) {
-               dev_err(dev->class_dev, "error! out of memory!\n");
+       if (ret < 0)
                return ret;
-       }
        for (n = 0; n < dev->n_subdevices; n++) {
                s = &dev->subdevices[n];
                switch (layout->sdtype[n]) {
index 522e1c0c385e3a60b83b0fa58f5c7b5112b66d6b..6205985806f5e208778176c2fe76d5296078cebb 100644 (file)
@@ -456,10 +456,8 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
        dev->iobase = iobase;
 
        ret = comedi_alloc_subdevices(dev, 2);
-       if (ret < 0) {
-               dev_err(dev->class_dev, "error! out of memory!\n");
+       if (ret < 0)
                return ret;
-       }
 
        s = dev->subdevices + 0;
        /* digital i/o subdevice (8255) */
index cfb69fa9c89daf76f50a4221472aebbc3c4e7bc8..f1d68dff1ab05d7efa7bebe62121d4e08dfc80e2 100644 (file)
@@ -228,10 +228,8 @@ static int pc263_common_attach(struct comedi_device *dev, unsigned long iobase)
        dev->iobase = iobase;
 
        ret = comedi_alloc_subdevices(dev, 1);
-       if (ret < 0) {
-               dev_err(dev->class_dev, "error! out of memory!\n");
+       if (ret < 0)
                return ret;
-       }
 
        s = dev->subdevices + 0;
        /* digital output subdevice */
index 8d33aeab53b1d608e0b601d2ae9b5fafc7c8d1e2..c64e32821c4d5c9a3185b42d707e697b79839c94 100644 (file)
@@ -1381,10 +1381,8 @@ static int pci224_attach_common(struct comedi_device *dev,
 
        /* Allocate subdevices.  There is only one!  */
        ret = comedi_alloc_subdevices(dev, 1);
-       if (ret < 0) {
-               dev_err(dev->class_dev, "error! out of memory!\n");
+       if (ret < 0)
                return ret;
-       }
 
        s = dev->subdevices + 0;
        /* Analog output subdevice. */
index 6f6fb527d5434be49a63a1011235a78dc8aea8db..bab2e37967ed2092aae75aa6cc38fd7bb254b759 100644 (file)
@@ -330,8 +330,6 @@ found:
        devpriv->BADR5 = pci_resource_start(pcidev, 5);
 
        if (comedi_alloc_subdevices(dev, 4) < 0) {
-               printk(KERN_ERR "comedi: dyna_pci10xx: "
-                       "failed allocating subdevices\n");
                mutex_unlock(&start_stop_sem);
                return -ENOMEM;
        }
index 3645e9ee8807b5a5f4f0bbe9ff2cedbc363a98c0..e1b30cc5d733a757f2011c551cc15d3f5adafeae 100644 (file)
@@ -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
         * 96-channel version of the board.
         */
-       if (comedi_alloc_subdevices(dev, 1) < 0) {
-               printk(KERN_ERR "cannot allocate subdevice data structures\n");
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
-       }
 
        s = dev->subdevices;
        s->private = NULL;
index 67fdac5b81d6af4e8a6248f62fe9a352acda9bc1..abaf6c758baf841704dccf6ebf0ed6e8026f6147 100644 (file)
@@ -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)
         */
-       if (comedi_alloc_subdevices(dev, n_subdevs) < 0) {
-               printk(KERN_ERR "comedi%d: cannot allocate subdevice data structures\n",
-                               dev->minor);
+       if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
                return -ENOMEM;
-       }
 
        /* First, AI */
        sdev_no = 0;
index ce5068e3b46e5c6480cbc72c281e0a3e2137395e..e4153bd27172660c54582e7a52eb3b4b9a0ae60a 100644 (file)
@@ -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
         * 96-channel version of the board.
         */
-       if (comedi_alloc_subdevices(dev, n_subdevs) < 0) {
-               dev_dbg(dev->hw_dev, "cannot allocate subdevice data structures\n");
+       if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
                return -ENOMEM;
-       }
 
        port = 0;
        asic = 0;
index 170bc48cfd1ce181def13e713395d57663858718..711dad77c59880438554d8a2c545e54e55d43d23 100644 (file)
@@ -468,10 +468,8 @@ static int unioxx5_attach(struct comedi_device *dev,
                return -1;
        }
 
-       if (comedi_alloc_subdevices(dev, n_subd) < 0) {
-               printk(KERN_ERR "out of memory\n");
+       if (comedi_alloc_subdevices(dev, n_subd) < 0)
                return -ENOMEM;
-       }
 
        /* initializing each of for same subdevices */
        for (i = 0; i < n_subd; i++, iobase += UNIOXX5_SUBDEV_ODDS) {
index 3819663b1cbe9e77121d4289b6a78ce9928128d8..79df200bb6ee4ee80675a0170ba344db738dfc7a 100644 (file)
@@ -2648,8 +2648,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
        /* allocate space for the subdevices */
        ret = comedi_alloc_subdevices(dev, n_subdevs);
        if (ret < 0) {
-               dev_err(&udev->interface->dev,
-                       "comedi%d: error alloc space for subdev\n", dev->minor);
                up(&udev->sem);
                return ret;
        }
index 262556ebc4db3f4eea1a46bb3c0c74f005690809..660dd4ee51e0b1991ce4b8ae8f7985080213b1f8 100644 (file)
@@ -1669,8 +1669,6 @@ static int usbduxfast_attach(struct comedi_device *dev,
        /* allocate space for the subdevices */
        ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0) {
-               printk(KERN_ERR "comedi%d: usbduxfast: error alloc space for "
-                      "subdev\n", dev->minor);
                up(&(usbduxfastsub[index].sem));
                up(&start_stop_sem);
                return ret;
index 87c613e8889293b3f3c005f275f948e492309f9c..f37e96c80b91d9a050f3fc6b48b82cc946b52510 100644 (file)
@@ -2693,8 +2693,6 @@ static int usbduxsigma_attach(struct comedi_device *dev,
        /* allocate space for the subdevices */
        ret = comedi_alloc_subdevices(dev, n_subdevs);
        if (ret < 0) {
-               dev_err(&udev->interface->dev,
-                       "comedi%d: no space for subdev\n", dev->minor);
                up(&udev->sem);
                up(&start_stop_sem);
                return ret;