staging: comedi: amplc_dio200: add register shift to board info
authorIan Abbott <abbotti@mev.co.uk>
Wed, 24 Oct 2012 15:48:04 +0000 (16:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Oct 2012 22:25:21 +0000 (15:25 -0700)
commit34ed78e8f7f7895e21dc3215c05993aa16adddf3
tree445078cd72e8cb89bcd8a3c24558fcb872f8c840
parent805afd6bd62b2a6050cda8592fa2f9f72abe5a19
staging: comedi: amplc_dio200: add register shift to board info

Add `mainshift` member to `struct dio200_board` to hold the amount of
left-shift required for main register offsets.  This is 0 for all the
boards currently supported so it doesn't need initializing explicitly in
any current element of `dio200_boards[]`.  It will be non-zero for some
new boards to be supported by this driver.

Modify the register access functions `dio200_read8()` and
`dio200_write8()` to take the shift into account.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_dio200.c