From: Ian Abbott Date: Mon, 29 Apr 2013 12:02:10 +0000 (+0100) Subject: s526: remove data[] from s526_gpct_config_t X-Git-Url: http://git.tremily.us/?p=comedi.git;a=commitdiff_plain;h=eea099003131499606e7af1f8ba94bc8949d687e s526: remove data[] from s526_gpct_config_t The elements of the data[] member of s526_gpct_config_t are only assigned and their values never used. Get rid of it. Signed-off-by: Ian Abbott --- diff --git a/comedi/drivers/s526.c b/comedi/drivers/s526.c index a7a9c653..3fa19f65 100644 --- a/comedi/drivers/s526.c +++ b/comedi/drivers/s526.c @@ -148,8 +148,6 @@ union cmReg { unsigned short value; }; -#define MAX_GPCT_CONFIG_DATA 6 - /* Different Application Classes for GPCT Subdevices */ /* The list is not exhaustive and needs discussion! */ typedef enum { @@ -165,7 +163,6 @@ typedef enum { */ typedef struct s526GPCTConfig { S526_GPCT_APP_CLASS app; - int data[MAX_GPCT_CONFIG_DATA]; } s526_gpct_config_t; /* @@ -522,17 +519,11 @@ static int s526_gpct_insn_config(comedi_device * dev, comedi_subdevice * s, comedi_insn * insn, lsampl_t * data) { 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); - for (i = 0; i < MAX_GPCT_CONFIG_DATA; i++) { - devpriv->s526_gpct_config[subdev_channel].data[i] = data[i]; -// printk("data[%d]=%x\n", i, data[i]); - } - // Check what type of Counter the user requested, data[0] contains // the Application type switch (data[0]) { @@ -775,12 +766,7 @@ static int s526_gpct_winsn(comedi_device * dev, comedi_subdevice * s, printk("s526: INSN_WRITE: PTG: Problem with data length -> %u\n", insn->n); return -EINVAL; - } else if ((data[1] > data[0]) && (data[0] > 0)) { - (devpriv->s526_gpct_config[subdev_channel]).data[0] = - data[0]; - (devpriv->s526_gpct_config[subdev_channel]).data[1] = - data[1]; - } else { + } else if ((data[1] <= data[0]) || (data[0] == 0)) { printk("s526: INSN_WRITE: PTG: Problem with Pulse params -> %d %d\n", data[0], data[1]); return -EINVAL;