staging: comedi: rtd520: cleanup the "find pci device" code
authorH Hartley Sweeten <hartleys@visionengravers.com>
Wed, 11 Jul 2012 00:25:33 +0000 (17:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Jul 2012 00:16:29 +0000 (17:16 -0700)
commit26550b32e1640020c1aea2e5ccd857b0ddd84b82
treeb90ef6327f515beb3dc8298140efb18479c5fdfd
parent7a819d1e5a40189ab94282dc0e42b76c7f52df8d
staging: comedi: rtd520: cleanup the "find pci device" code

Use for_each_pci_dev() instead of open-coding the for loop. Create
local variables for the bus and slot options as well as the thisboard
pointer in order to clarify the code. Consolidate the printk's when
a supported board is not found into one dev_warn message.

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