Skip to content

Commit

Permalink
staging: comedi: rtd520: remove RtdDacRange 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
'writew'. 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 15, 2012
1 parent bb50054 commit 9db311d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,6 @@ struct rtdPrivate {

/* Macros to access registers */

/* Set DAC output type and range */
#define RtdDacRange(dev, n, v) \
writew((v) & 7, devpriv->las0 \
+(((n) == 0) ? LAS0_DAC1_CTRL : LAS0_DAC2_CTRL))

/* Reset DAC FIFO */
#define RtdDacClearFifo(dev, n) \
writel(0, devpriv->las0+(((n) == 0) ? LAS0_DAC1_RESET : \
Expand Down Expand Up @@ -1538,7 +1533,8 @@ static int rtd_ao_winsn(struct comedi_device *dev,
int range = CR_RANGE(insn->chanspec);

/* Configure the output range (table index matches the range values) */
RtdDacRange(dev, chan, range);
writew(range & 7, devpriv->las0 +
((chan == 0) ? LAS0_DAC1_CTRL : LAS0_DAC2_CTRL));

/* Writing a list of values to an AO channel is probably not
* very useful, but that's how the interface is defined. */
Expand Down

0 comments on commit 9db311d

Please sign in to comment.