fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / usb / core / hcd-pci.c
index 66b7840..edf4300 100644 (file)
@@ -16,7 +16,6 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -126,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
 
        pci_set_master (dev);
 
-       retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ);
+       retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED);
        if (retval != 0)
                goto err4;
        return retval;
@@ -282,7 +281,7 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, pm_message_t message)
                        (void) usb_hcd_pci_resume (dev);
                }
 
-       } else {
+       } else if (hcd->state != HC_STATE_HALT) {
                dev_dbg (hcd->self.controller, "hcd state %d; not suspended\n",
                        hcd->state);
                WARN_ON(1);
@@ -414,4 +413,20 @@ EXPORT_SYMBOL (usb_hcd_pci_resume);
 
 #endif /* CONFIG_PM */
 
+/**
+ * usb_hcd_pci_shutdown - shutdown host controller
+ * @dev: USB Host Controller being shutdown
+ */
+void usb_hcd_pci_shutdown (struct pci_dev *dev)
+{
+       struct usb_hcd          *hcd;
+
+       hcd = pci_get_drvdata(dev);
+       if (!hcd)
+               return;
+
+       if (hcd->driver->shutdown)
+               hcd->driver->shutdown(hcd);
+}
+EXPORT_SYMBOL (usb_hcd_pci_shutdown);