The me4000_cnt_info in the boardinfo struct is used to indicate
that the board has an 8254 counter. Add a 'has_counter' field
to struct me4000_board and remove the struct me4000_cnt_info.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4660i",
.device_id = 0x4661,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4660s",
.device_id = 0x4662,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4660is",
.device_id = 0x4663,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4670",
.device_id = 0x4670,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4670i",
.device_id = 0x4671,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4670s",
.device_id = 0x4672,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4670is",
.device_id = 0x4673,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4680",
.device_id = 0x4680,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4680i",
.device_id = 0x4681,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4680s",
.device_id = 0x4682,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
}, {
.name = "ME-4680is",
.device_id = 0x4683,
.dio = {
.count = 4,
},
- .cnt = {
- .count = 3,
- },
+ .has_counter = 1,
},
};
s = &dev->subdevices[3];
- if (thisboard->cnt.count) {
+ if (thisboard->has_counter) {
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
- s->n_chan = thisboard->cnt.count;
+ s->n_chan = 3;
s->maxdata = 0xFFFF; /* 16 bit counters */
s->insn_read = me4000_cnt_insn_read;
s->insn_write = me4000_cnt_insn_write;
int count;
};
-struct me4000_cnt_info {
- int count;
-};
-
struct me4000_board {
const char *name;
unsigned short device_id;
struct me4000_ao_info ao;
struct me4000_ai_info ai;
struct me4000_dio_info dio;
- struct me4000_cnt_info cnt;
+ int has_counter;
};
#define thisboard ((const struct me4000_board *)dev->board_ptr)