Commit 41b3f604 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

[PATCH] hp100.c: add missing pci_enable_device()

Add pci_enable_device()/pci_disable_device().  In the past, drivers often
worked without this, but it is now required in order to route PCI interrupts
correctly.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 94ae67e9
...@@ -2914,6 +2914,11 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev, ...@@ -2914,6 +2914,11 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev,
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
if (pci_enable_device(pdev)) {
err = -ENODEV;
goto out0;
}
SET_MODULE_OWNER(dev); SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
...@@ -2951,6 +2956,8 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev, ...@@ -2951,6 +2956,8 @@ static int __devinit hp100_pci_probe (struct pci_dev *pdev,
release_region(dev->base_addr, HP100_REGION_SIZE); release_region(dev->base_addr, HP100_REGION_SIZE);
out1: out1:
free_netdev(dev); free_netdev(dev);
pci_disable_device(pdev);
out0:
return err; return err;
} }
...@@ -2959,6 +2966,7 @@ static void __devexit hp100_pci_remove (struct pci_dev *pdev) ...@@ -2959,6 +2966,7 @@ static void __devexit hp100_pci_remove (struct pci_dev *pdev)
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
cleanup_dev(dev); cleanup_dev(dev);
pci_disable_device(pdev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment