aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-10-24 19:33:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-24 22:35:50 -0400
commit87c4e2c62e507625af7cab5f46a019ab17d95bb7 (patch)
tree6b123f3e8ba0abd7c85ae044305d962139ced3a2 /drivers
parentbe2fcdbf91f77c7658f87a782a86a3cfc0775b2d (diff)
staging: comedi: cb_pcidda: cleanup DADATA define
Rename the define used for the D/A Data register so that is has namespace with this driver. Change the define so that it takes the channel as a parameter to calculate the correct register offset. 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/cb_pcidda.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/cb_pcidda.c b/drivers/staging/comedi/drivers/cb_pcidda.c
index 90930c801c8c..6b69e530ca72 100644
--- a/drivers/staging/comedi/drivers/cb_pcidda.c
+++ b/drivers/staging/comedi/drivers/cb_pcidda.c
@@ -97,7 +97,7 @@
97/* manual says to set this bit with no explanation */ 97/* manual says to set this bit with no explanation */
98#define DUMMY_BIT 0x40 98#define DUMMY_BIT 0x40
99 99
100#define DADATA 8 /* FIRST D/A DATA REGISTER (0) */ 100#define CB_DDA_DA_DATA_REG(x) (0x08 + ((x) * 2))
101 101
102static const struct comedi_lrange cb_pcidda_ranges = { 102static const struct comedi_lrange cb_pcidda_ranges = {
103 6, { 103 6, {
@@ -393,7 +393,7 @@ static int cb_pcidda_ao_winsn(struct comedi_device *dev,
393 outw(ctrl, dev->iobase + CB_DDA_DA_CTRL_REG); 393 outw(ctrl, dev->iobase + CB_DDA_DA_CTRL_REG);
394 394
395 /* write data */ 395 /* write data */
396 outw(data[0], dev->iobase + DADATA + channel * 2); 396 outw(data[0], dev->iobase + CB_DDA_DA_DATA_REG(channel));
397 397
398 /* return the number of samples read/written */ 398 /* return the number of samples read/written */
399 return 1; 399 return 1;