Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

staging: comedi: s626: simplify dio register access



This driver has three dio subdevices, each with 16 channels. These
subdevices use hardware registers that are spaced 0x10 bytes apart
for each "group" of 16 channels.

Create new macros to get the correct addresses for each register
based on the dio "group". Use the s->private (void *) to hold the
"group" number to use in the subdevice functions.

This allows removing struct dio_private and all its uses. It also
removes the ugly casts used to get the register address.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1330af4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment