Commit ca98ee7b authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

Staging: comedi: s526: Get rid of global variable 'cmReg'.

Signed-off-by: default avatarFrank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 10f27014
...@@ -126,10 +126,10 @@ struct counter_mode_register_t { ...@@ -126,10 +126,10 @@ struct counter_mode_register_t {
unsigned short reserved:1; unsigned short reserved:1;
}; };
union { union cmReg {
struct counter_mode_register_t reg; struct counter_mode_register_t reg;
unsigned short value; unsigned short value;
} cmReg; };
#define MAX_GPCT_CONFIG_DATA 6 #define MAX_GPCT_CONFIG_DATA 6
...@@ -285,6 +285,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -285,6 +285,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
int i, n; int i, n;
/* short value; */ /* short value; */
/* int subdev_channel = 0; */ /* int subdev_channel = 0; */
union cmReg cmReg;
printk("comedi%d: s526: ", dev->minor); printk("comedi%d: s526: ", dev->minor);
...@@ -516,6 +517,7 @@ static int s526_gpct_insn_config(struct comedi_device *dev, ...@@ -516,6 +517,7 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */
int i; int i;
short value; short value;
union cmReg cmReg;
/* printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); */ /* printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); */
...@@ -741,6 +743,7 @@ static int s526_gpct_winsn(struct comedi_device *dev, ...@@ -741,6 +743,7 @@ static int s526_gpct_winsn(struct comedi_device *dev,
{ {
int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */
short value; short value;
union cmReg cmReg;
printk("s526: GPCT_INSN_WRITE on channel %d\n", subdev_channel); printk("s526: GPCT_INSN_WRITE on channel %d\n", subdev_channel);
cmReg.value = inw(ADDR_CHAN_REG(REG_C0M, subdev_channel)); cmReg.value = inw(ADDR_CHAN_REG(REG_C0M, subdev_channel));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment