]> git.openfabrics.org - ~emulex/infiniband.git/commit
staging: comedi: adv_pci_dio: simplify the 'detach'
authorH Hartley Sweeten <hartleys@visionengravers.com>
Sat, 18 Aug 2012 01:20:51 +0000 (18:20 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 18:20:40 +0000 (11:20 -0700)
commitcb448d6572219efa4a6eb0c98f37125079b78549
treeaa0fae6ddc0f8d66b9fd7019c58a27203d56be15
parent4bf75257ff84a57d2e878f149514e4fcd23a93bd
staging: comedi: adv_pci_dio: simplify the 'detach'

Currently the 'detach' function in this driver walks thru the
boardinfo in order to find the subdevice index for any sdio
subdevices in order to call the subdev_8255_cleanup(). Then
it goes thru all the subdevices to clean the s->private pointer.

All the sdio subdevices are unique in that the s->type is
COMEDI_SUBD_DIO. Use that to know when to call the cleanup
for the 8255 subdevice.

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