staging: comedi: adv_pci1710: refactor boardinfo 'cardtype'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 20 Jan 2015 21:53:19 +0000 (14:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jan 2015 11:59:12 +0000 (19:59 +0800)
commite4451eeb456550d1fa1641ce369c1b914b02d225
treea9c7894b6864a1bd5c1cafe911b933797629fbf9
parent7a772eea0ca15bafb76db218d4f5bd69d9bf9f77
staging: comedi: adv_pci1710: refactor boardinfo 'cardtype'

The 'cardtype' in the boardinfo is only used to:

 1) determine if the board is a pci1720 during the attach of the driver
    and when reseting the board
 2) determine is the board is not a pci1713 when checking for analog input
    data dropout

There is also an unnecessary use of the 'cardtype' when canceling an analog
input async command.

Remove the 'cardtype' member and add two bit-field flags, 'is_pci1713' and
'is_pci1720'. Refactor the driver to use the new flags.

Remove the unnecessary cardtype handling in pci171x_ai_cancel().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adv_pci1710.c