Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364110
b: refs/heads/master
c: 4353552
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 6fff79f commit 7ce62a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 55d2a208923e655d3453b66676f957b0d60be108
refs/heads/master: 43535526367196d7dcf11f563b0e418b1efe00fd
11 changes: 5 additions & 6 deletions trunk/drivers/staging/comedi/drivers/8255_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ static int pci_8255_auto_attach(struct comedi_device *dev,
const struct pci_8255_boardinfo *board = NULL;
struct pci_8255_private *devpriv;
struct comedi_subdevice *s;
resource_size_t iobase;
unsigned long len;
int ret;
int i;

Expand All @@ -207,15 +205,14 @@ static int pci_8255_auto_attach(struct comedi_device *dev,
ret = comedi_pci_enable(dev);
if (ret)
return ret;
iobase = pci_resource_start(pcidev, board->dio_badr);
len = pci_resource_len(pcidev, board->dio_badr);

if (board->is_mmio) {
devpriv->mmio_base = ioremap(iobase, len);
devpriv->mmio_base = pci_ioremap_bar(pcidev, board->dio_badr);
if (!devpriv->mmio_base)
return -ENOMEM;
} else {
dev->iobase = pci_resource_start(pcidev, board->dio_badr);
}
dev->iobase = iobase;

/*
* One, two, or four subdevices are setup by this driver depending
Expand All @@ -227,6 +224,8 @@ static int pci_8255_auto_attach(struct comedi_device *dev,
return ret;

for (i = 0; i < board->n_8255; i++) {
unsigned long iobase;

s = &dev->subdevices[i];
if (board->is_mmio) {
iobase = (unsigned long)(devpriv->mmio_base + (i * 4));
Expand Down

0 comments on commit 7ce62a1

Please sign in to comment.