Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337227
b: refs/heads/master
c: a56a8a3
h: refs/heads/master
i:
  337225: 3b53184
  337223: 91e941b
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent fbfe853 commit a7d1fc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 4821bdfc9c39349f97e9c604992aafd55f45255a
refs/heads/master: a56a8a3c4979b0c968a53ab9cdbf6887e8e6ba1e
16 changes: 14 additions & 2 deletions trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,18 @@ struct dio200_subdev_intr {
int continuous;
};

static inline const struct dio200_layout *
dio200_board_layout(const struct dio200_board *board)
{
return &dio200_layouts[board->layout];
}

static inline const struct dio200_layout *
dio200_dev_layout(struct comedi_device *dev)
{
return dio200_board_layout(comedi_board(dev));
}

static inline bool is_pci_board(const struct dio200_board *board)
{
return DO_PCI && board->bustype == pci_bustype;
Expand Down Expand Up @@ -1195,7 +1207,7 @@ static int dio200_common_attach(struct comedi_device *dev, unsigned long iobase,
{
const struct dio200_board *thisboard = comedi_board(dev);
struct dio200_private *devpriv = dev->private;
const struct dio200_layout *layout = &dio200_layouts[thisboard->layout];
const struct dio200_layout *layout = dio200_board_layout(thisboard);
struct comedi_subdevice *s;
int sdx;
unsigned int n;
Expand Down Expand Up @@ -1353,7 +1365,7 @@ static void dio200_detach(struct comedi_device *dev)
if (dev->irq)
free_irq(dev->irq, dev);
if (dev->subdevices) {
layout = &dio200_layouts[thisboard->layout];
layout = dio200_board_layout(thisboard);
for (n = 0; n < dev->n_subdevices; n++) {
struct comedi_subdevice *s = &dev->subdevices[n];
switch (layout->sdtype[n]) {
Expand Down

0 comments on commit a7d1fc9

Please sign in to comment.