Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324943
b: refs/heads/master
c: eedf429
h: refs/heads/master
i:
  324941: 31d3180
  324939: ee638eb
  324935: 5e5a447
  324927: 89adafa
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 8, 2012
1 parent 8e414aa commit 8e37dc4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 44 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 556e451d0d1ee7f9f40d4d83b39743176b8b39e4
refs/heads/master: eedf4299b5af712ee6f1db031308abe1a4dd7c82
52 changes: 14 additions & 38 deletions trunk/drivers/staging/comedi/drivers/me4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4660i",
.device_id = 0x4661,
Expand All @@ -97,9 +95,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4660s",
.device_id = 0x4662,
Expand All @@ -111,9 +107,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4660is",
.device_id = 0x4663,
Expand All @@ -125,9 +119,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4670",
.device_id = 0x4670,
Expand All @@ -142,9 +134,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4670i",
.device_id = 0x4671,
Expand All @@ -159,9 +149,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4670s",
.device_id = 0x4672,
Expand All @@ -177,9 +165,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4670is",
.device_id = 0x4673,
Expand All @@ -195,9 +181,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4680",
.device_id = 0x4680,
Expand All @@ -213,9 +197,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4680i",
.device_id = 0x4681,
Expand All @@ -231,9 +213,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4680s",
.device_id = 0x4682,
Expand All @@ -250,9 +230,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
}, {
.name = "ME-4680is",
.device_id = 0x4683,
Expand All @@ -269,9 +247,7 @@ static const struct me4000_board me4000_boards[] = {
.dio = {
.count = 4,
},
.cnt = {
.count = 3,
},
.has_counter = 1,
},
};

Expand Down Expand Up @@ -2290,10 +2266,10 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)

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;
Expand Down
6 changes: 1 addition & 5 deletions trunk/drivers/staging/comedi/drivers/me4000.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,13 @@ struct me4000_dio_info {
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)
Expand Down

0 comments on commit 8e37dc4

Please sign in to comment.