staging: comedi: addi_apci_2200: remove devpriv allocation
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 21 Jan 2013 22:17:40 +0000 (15:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2013 00:03:02 +0000 (16:03 -0800)
The 'devpriv' is not used in this driver. Remove it's allocation
in the auto_attach and the check for it in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/addi_apci_2200.c

index 99a206aa5ab4894fb24b68db331d43145966bd1c..7ea0dc673b5c20796da0b3bb79c523c6ed805f2b 100644 (file)
@@ -81,7 +81,6 @@ static int apci2200_auto_attach(struct comedi_device *dev,
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        const struct addi_board *this_board;
-       struct addi_private *devpriv;
        struct comedi_subdevice *s;
        int ret, n_subdevices;
 
@@ -91,11 +90,6 @@ static int apci2200_auto_attach(struct comedi_device *dev,
        dev->board_ptr = this_board;
        dev->board_name = this_board->pc_DriverName;
 
-       devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
-       if (!devpriv)
-               return -ENOMEM;
-       dev->private = devpriv;
-
        ret = comedi_pci_enable(pcidev, dev->board_name);
        if (ret)
                return ret;
@@ -154,12 +148,9 @@ static int apci2200_auto_attach(struct comedi_device *dev,
 static void apci2200_detach(struct comedi_device *dev)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-       struct addi_private *devpriv = dev->private;
 
-       if (devpriv) {
-               if (dev->iobase)
-                       apci2200_reset(dev);
-       }
+       if (dev->iobase)
+               apci2200_reset(dev);
        if (dev->subdevices)
                addi_watchdog_cleanup(&dev->subdevices[4]);
        if (pcidev) {