Skip to content

Commit

Permalink
staging: comedi: rtd520: remove RtdDio0Read macro
Browse files Browse the repository at this point in the history
This macro uses the 'devpriv' macro which relies on a local variable
having a specific name. Plus it's just a wrapper around a simple
'readw'. Remove the macro.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jul 13, 2012
1 parent db17012 commit 2b6e6b8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,6 @@ struct rtdPrivate {
/* Macros to access registers */

/* Digital IO */
#define RtdDio0Read(dev) \
(readw(devpriv->las0+LAS0_DIO0) & 0xff)
#define RtdDio0Write(dev, v) \
writew((v) & 0xff, devpriv->las0+LAS0_DIO0)

Expand Down Expand Up @@ -1664,7 +1662,7 @@ static int rtd_dio_insn_bits(struct comedi_device *dev,
}
/* on return, data[1] contains the value of the digital
* input lines. */
data[1] = RtdDio0Read(dev);
data[1] = readw(devpriv->las0 + LAS0_DIO0) & 0xff;

/*DPRINTK("rtd520:port_0 wrote: 0x%x read: 0x%x\n", s->state, data[1]); */

Expand Down

0 comments on commit 2b6e6b8

Please sign in to comment.