Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337313
b: refs/heads/master
c: 736b605
h: refs/heads/master
i:
  337311: 5099702
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 26, 2012
1 parent c1839f2 commit 4913ae1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 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: 0014048e091da8bfdbe6f5a15d4045d3747d1335
refs/heads/master: 736b605c897204b8c05f15160f12e70c61b2e6e6
11 changes: 4 additions & 7 deletions trunk/drivers/staging/comedi/drivers/me_daq.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ static const struct me_board me_boards[] = {
struct me_private_data {
void __iomem *plx_regbase; /* PLX configuration base address */
void __iomem *me_regbase; /* Base address of the Meilhaus card */
unsigned long plx_regbase_size; /* Size of PLX configuration space */
unsigned long me_regbase_size; /* Size of Meilhaus space */

unsigned short control_1; /* Mirror of CONTROL_1 register */
Expand Down Expand Up @@ -639,7 +638,6 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
struct me_private_data *dev_private;
struct comedi_subdevice *s;
resource_size_t plx_regbase_tmp;
unsigned long plx_regbase_size_tmp;
resource_size_t me_regbase_tmp;
unsigned long me_regbase_size_tmp;
resource_size_t swap_regbase_tmp;
Expand All @@ -664,13 +662,12 @@ static int me_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
"Failed to enable PCI device and request regions\n");
return -EIO;
}
dev->iobase = 1; /* detach needs this */

/* Read PLX register base address [PCI_BASE_ADDRESS #0]. */
plx_regbase_tmp = pci_resource_start(pcidev, 0);
plx_regbase_size_tmp = pci_resource_len(pcidev, 0);
dev_private->plx_regbase =
ioremap(plx_regbase_tmp, plx_regbase_size_tmp);
dev_private->plx_regbase_size = plx_regbase_size_tmp;
dev_private->plx_regbase = ioremap(plx_regbase_tmp,
pci_resource_len(pcidev, 0));
if (!dev_private->plx_regbase) {
dev_err(dev->class_dev, "Failed to remap I/O memory\n");
return -ENOMEM;
Expand Down Expand Up @@ -791,7 +788,7 @@ static void me_detach(struct comedi_device *dev)
iounmap(dev_private->plx_regbase);
}
if (pcidev) {
if (dev_private->plx_regbase_size)
if (dev->iobase)
comedi_pci_disable(pcidev);
pci_dev_put(pcidev);
}
Expand Down

0 comments on commit 4913ae1

Please sign in to comment.