Skip to content
Commit 0275299f authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 50e338b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment