Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363438
b: refs/heads/master
c: ca4d4aa
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 12, 2013
1 parent b63efa4 commit aecae8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: f4309c0f1463cdea69f958de169ed987fb4dfdb2
refs/heads/master: ca4d4aa6b79f143f4c8606c60bad005405623faa
12 changes: 7 additions & 5 deletions trunk/drivers/staging/comedi/drivers/ni_atmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
struct pnp_dev *isapnp_dev = NULL;
int i;

for (i = 0; i < n_ni_boards; i++) {
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
isapnp_dev = pnp_find_dev(NULL,
ISAPNP_VENDOR('N', 'I', 'C'),
ISAPNP_FUNCTION(ni_boards[i].
Expand All @@ -377,7 +377,7 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
}
break;
}
if (i == n_ni_boards)
if (i == ARRAY_SIZE(ni_boards))
return -ENODEV;
*dev = isapnp_dev;
return 0;
Expand All @@ -388,7 +388,7 @@ static int ni_getboardtype(struct comedi_device *dev)
int device_id = ni_read_eeprom(dev, 511);
int i;

for (i = 0; i < n_ni_boards; i++) {
for (i = 0; i < ARRAY_SIZE(ni_boards); i++) {
if (ni_boards[i].device_id == device_id)
return i;

Expand All @@ -406,6 +406,7 @@ static int ni_getboardtype(struct comedi_device *dev)
static int ni_atmio_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct ni_board_struct *boardtype;
struct ni_private *devpriv;
struct pnp_dev *isapnp_dev;
int ret;
Expand Down Expand Up @@ -466,9 +467,10 @@ static int ni_atmio_attach(struct comedi_device *dev,
return -EIO;

dev->board_ptr = ni_boards + board;
boardtype = comedi_board(dev)

printk(" %s", boardtype.name);
dev->board_name = boardtype.name;
printk(" %s", boardtype->name);
dev->board_name = boardtype->name;

/* irq stuff */

Expand Down

0 comments on commit aecae8c

Please sign in to comment.