staging: comedi: adv_pci1723: cleanup card reset
authorH Hartley Sweeten <hartleys@visionengravers.com>
Sat, 18 Aug 2012 01:18:40 +0000 (18:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Sep 2012 18:20:35 +0000 (11:20 -0700)
commitedf51472131eedc824609a7bab3be43056cb9eff
tree60c10fac398e6e2aeb9e0271ce065fad4b60a239
parent5222687a7fafdb8633151269103714f2075e9c3d
staging: comedi: adv_pci1723: cleanup card reset

Only one 'reset' of the card is required in the attach. Remove the
one before setting up the subdevices and leave the one before
exiting the attach function.

The 'valid' variable in the private data is not needed. This variable
is used in the detach to determine if it's ok to call the 'reset'
function. Checking if dev->iobase is valid works just as well.

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