From 4502d05c019ac4728060217a5d0f25eaf175db79 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Fri, 7 Aug 2009 14:40:20 +0000 Subject: [PATCH] Get rid of global variable 'cmReg'. --- comedi/drivers/s526.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/comedi/drivers/s526.c b/comedi/drivers/s526.c index 0b350d77..f67925e5 100644 --- a/comedi/drivers/s526.c +++ b/comedi/drivers/s526.c @@ -126,10 +126,10 @@ typedef struct { unsigned short reserved:1; } counter_mode_register_t; -union { +union cmReg { counter_mode_register_t reg; unsigned short value; -} cmReg; +}; #define MAX_GPCT_CONFIG_DATA 6 @@ -277,6 +277,7 @@ static int s526_attach(comedi_device * dev, comedi_devconfig * it) int i, n; // sampl_t value; // int subdev_channel = 0; + union cmReg cmReg; printk("comedi%d: s526: ", dev->minor); @@ -506,6 +507,7 @@ static int s526_gpct_insn_config(comedi_device * dev, comedi_subdevice * s, int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec int i; sampl_t value; + union cmReg cmReg; // printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); @@ -719,6 +721,7 @@ static int s526_gpct_winsn(comedi_device * dev, comedi_subdevice * s, { int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec sampl_t value; + union cmReg cmReg; printk("s526: GPCT_INSN_WRITE on channel %d\n", subdev_channel); cmReg.value = inw(ADDR_CHAN_REG(REG_C0M, subdev_channel)); -- 2.26.2