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 <abbotti@mev.co.uk>
-#define MAX_GPCT_CONFIG_DATA 6
-
/* Different Application Classes for GPCT Subdevices */
/* The list is not exhaustive and needs discussion! */
typedef enum {
/* Different Application Classes for GPCT Subdevices */
/* The list is not exhaustive and needs discussion! */
typedef enum {
*/
typedef struct s526GPCTConfig {
S526_GPCT_APP_CLASS app;
*/
typedef struct s526GPCTConfig {
S526_GPCT_APP_CLASS app;
- int data[MAX_GPCT_CONFIG_DATA];
comedi_insn * insn, lsampl_t * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
comedi_insn * insn, lsampl_t * data)
{
int subdev_channel = CR_CHAN(insn->chanspec); // Unpack chanspec
sampl_t value;
union cmReg cmReg;
// printk("s526: GPCT_INSN_CONFIG: Configuring Channel %d\n", subdev_channel);
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]) {
// Check what type of Counter the user requested, data[0] contains
// the Application type
switch (data[0]) {
printk("s526: INSN_WRITE: PTG: Problem with data length -> %u\n",
insn->n);
return -EINVAL;
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;
printk("s526: INSN_WRITE: PTG: Problem with Pulse params -> %d %d\n",
data[0], data[1]);
return -EINVAL;