staging: comedi: amplc_pc263: store the pci_dev in the comedi_device
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 19 Jul 2012 01:40:01 +0000 (18:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jul 2012 23:32:53 +0000 (16:32 -0700)
commit69fa3b755eb4ed8754a761a1528504ca9681e4b0
tree98bfd21a01d295093a411e313824e87e0673139b
parent1c16519fc2d63d0f58a7c54a47404e3de2c20396
staging: comedi: amplc_pc263: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.

Since the pci_dev is no longer held in the provate data, we can
also cleanup the detach a bit. Remove the IS_ENABLED() tests in
the detach. If the pci_dev is non NULL it's a PCI device otherwise
it's an ISA device. Using IS_ENABLED() to omit the code paths
makes the code a bit confusing and doesn't save much.

Since the pci_dev was the only thing in the private data, remove
the struct, and it's allocation.

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/amplc_pc263.c