staging: comedi: adv_pci_dio: refactor 's8254' boardinfo
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 23 Feb 2015 21:57:48 +0000 (14:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 02:51:51 +0000 (18:51 -0800)
commit0275299f26ecde814c7e03f3fb5a6fa73c60acd9
treedbb270b9386e7cdaa31aa1cea852b9a137989a17
parent50e338b96c1ad0a6e77f559c0dcba5944d0095c1
staging: comedi: adv_pci_dio: refactor 's8254' boardinfo

The boardinfo for the 8254 timer is overly complex. The 8254 timer always has
3 channels and the 'regs' and 'specflags' members of diosubd_data are not
used. The only necessary information is the base 'addr' offset to the 8254
registers.

Replace the 's8254' member with an unsigned long 'timer_regbase'. Use that
to determine if the board has an 8254 timer during the attach of the driver.
Save the 'timer_regbase' in the subdevice 'private' pointer to use in the
subdevice functions.

For aesthetics, absorb pci_dio_add_8254() into the driver attach function.

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