staging: comedi: adl_pci6208: refactor pci6208_find_device()
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 27 Jun 2012 21:55:19 +0000 (14:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 22:40:02 +0000 (15:40 -0700)
commitcde6f08a5e28e2f0c08ecadd98465bfb48e01472
tree591509ff7bfe23c6d52672bd044fd40ba5985dd0
parent949a18d39d75e92f516d562befe5447d368ab67d
staging: comedi: adl_pci6208: refactor pci6208_find_device()

Make the "find pci device" functions consistent in the comedi
drivers. Hopefully well be able to move it into the core...

Refactor the "find pci device" function to return a pointer to
the found struct pci_dev instead of an error code. Also, change
some of the tests to reduce the indent level of the code. Pass
the struct comedi_devconfig pointer to the function instead of
the bus/slot numbers.

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