staging: comedi: amplc_dio200: store the pci_dev in the comedi_device
authorH Hartley Sweeten <hartleys@visionengravers.com>
Thu, 19 Jul 2012 01:37:50 +0000 (18:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jul 2012 23:32:52 +0000 (16:32 -0700)
commitb5e6df11f4820179573637e05c132b4561da92ce
treee4d34c19efc5ea1da3ff47d8779210eb847a5f1d
parentdd90576838a6f9eb51ffe11796073bdd733847df
staging: comedi: amplc_dio200: 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.

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_dio200.c