From: Alan Cox Date: Wed, 27 Sep 2006 22:43:22 +0000 (-0700) Subject: ohci: Use ref-counting hotplug safe interfaces X-Git-Tag: v2.6.19-rc1~875 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2e3a43f0b6f16705ec76d3744b82a116965ebebe;p=linux-2.6-omap-h63xx.git ohci: Use ref-counting hotplug safe interfaces We want to avoid legacy APIs like pci_find_slot(). Signed-off-by: Alan Cox Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index 3732db7d68e..87441855278 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c @@ -73,13 +73,14 @@ ohci_pci_start (struct usb_hcd *hcd) else if (pdev->vendor == PCI_VENDOR_ID_NS) { struct pci_dev *b; - b = pci_find_slot (pdev->bus->number, + b = pci_get_slot (pdev->bus, PCI_DEVFN (PCI_SLOT (pdev->devfn), 1)); if (b && b->device == PCI_DEVICE_ID_NS_87560_LIO && b->vendor == PCI_VENDOR_ID_NS) { ohci->flags |= OHCI_QUIRK_SUPERIO; ohci_dbg (ohci, "Using NSC SuperIO setup\n"); } + pci_dev_put(b); } /* Check for Compaq's ZFMicro chipset, which needs short