From: Ian Abbott Date: Mon, 21 Sep 2009 19:35:42 +0000 (-0400) Subject: Staging: comedi: s526: Get rid of global variable 'cmReg'. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca98ee7bb4005365ad395b53229e2f6d01ca7cbd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Staging: comedi: s526: Get rid of global variable 'cmReg'. Signed-off-by: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 736441f3c815..dbde118f2a16 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -126,10 +126,10 @@ struct counter_mode_register_t { unsigned short reserved:1; }; -union { +union cmReg { struct counter_mode_register_t reg; unsigned short value; -} cmReg; +}; #define MAX_GPCT_CONFIG_DATA 6 @@ -285,6 +285,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) int i, n; /* short value; */ /* int subdev_channel = 0; */ + union cmReg cmReg; printk("comedi%d: s526: ", dev->minor); @@ -516,6 +517,7 @@ static int s526_gpct_insn_config(struct comedi_device *dev, int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ int i; short value; + union cmReg cmReg; /* printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel); */ @@ -741,6 +743,7 @@ static int s526_gpct_winsn(struct comedi_device *dev, { int subdev_channel = CR_CHAN(insn->chanspec); /* Unpack chanspec */ short 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));