aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2009-09-21 15:35:42 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-10-09 16:47:25 -0400
commitca98ee7bb4005365ad395b53229e2f6d01ca7cbd (patch)
treed9b30f55781d532e81ebcf82ac4c3eb3d8f1ddb8 /drivers/staging
parent10f27014f42f0a4cb32bf45f214fa7ad7c261b1e (diff)
Staging: comedi: s526: Get rid of global variable 'cmReg'.
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/comedi/drivers/s526.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c
index 736441f3c81..dbde118f2a1 100644
--- a/drivers/staging/comedi/drivers/s526.c
+++ b/drivers/staging/comedi/drivers/s526.c
@@ -126,10 +126,10 @@ struct counter_mode_register_t {
126 unsigned short reserved:1; 126 unsigned short reserved:1;
127}; 127};
128 128
129union { 129union cmReg {
130 struct counter_mode_register_t reg; 130 struct counter_mode_register_t reg;
131 unsigned short value; 131 unsigned short value;
132} cmReg; 132};
133 133
134#define MAX_GPCT_CONFIG_DATA 6 134#define MAX_GPCT_CONFIG_DATA 6
135 135
@@ -285,6 +285,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
285 int i, n; 285 int i, n;
286/* short value; */ 286/* short value; */
287/* int subdev_channel = 0; */ 287/* int subdev_channel = 0; */
288 union cmReg cmReg;
288 289
289 printk("comedi%d: s526: ", dev->minor); 290 printk("comedi%d: s526: ", dev->minor);
290 291
@@ -516,6 +517,7 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
516 int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ 517 int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */
517 int i; 518 int i;
518 short value; 519 short value;
520 union cmReg cmReg;
519 521
520/* printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); */ 522/* printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); */
521 523
@@ -741,6 +743,7 @@ static int s526_gpct_winsn(struct comedi_device *dev,
741{ 743{
742 int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ 744 int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */
743 short value; 745 short value;
746 union cmReg cmReg;
744 747
745 printk("s526: GPCT_INSN_WRITE on channel %d\n", subdev_channel); 748 printk("s526: GPCT_INSN_WRITE on channel %d\n", subdev_channel);
746 cmReg.value = inw(ADDR_CHAN_REG(REG_C0M, subdev_channel)); 749 cmReg.value = inw(ADDR_CHAN_REG(REG_C0M, subdev_channel));