aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/driver.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:05:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:05:02 -0400
commit9895850b23886e030cd1e7241d5529a57e969c3d (patch)
tree1061626db450aeb72dcfcd247c24b33e5238c8c4 /drivers/usb/core/driver.c
parentfc385c313275b114bc6ad36e60c5177d63250548 (diff)
parentb58af4066d240b18b43f202e07b9ec7461d90b17 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (148 commits) USB: serial: fix stalled writes USB: remove fake "address-of" expressions USB: fix thread-unsafe anchor utiliy routines USB: usbtest: support test device with only one iso-in or iso-out endpoint USB: usbtest: avoid to free coherent buffer in atomic context USB: xhci: Set DMA mask for host. USB: xhci: Don't flush doorbell writes. USB: xhci: Reduce reads and writes of interrupter registers. USB: xhci: Make xhci_set_hc_event_deq() static. USB: xhci: Minimize HW event ring dequeue pointer writes. USB: xhci: Make xhci_handle_event() static. USB: xhci: Remove unnecessary reads of IRQ_PENDING register. USB: xhci: Performance - move xhci_work() into xhci_irq() USB: xhci: Performance - move interrupt handlers into xhci-ring.c USB: xhci: Performance - move functions that find ep ring. USB:: fix linux/usb.h kernel-doc warnings USB: add USB serial ssu100 driver USB: usb-storage: implement autosuspend USB: ehci: fix remove of ehci debugfs dir USB: Add USB 2.0 to ssb ohci driver ...
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r--drivers/usb/core/driver.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index a6bd53ace03..d7a4401ef01 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -1742,9 +1742,8 @@ static int usb_runtime_suspend(struct device *dev)
1742 } 1742 }
1743 1743
1744 /* Prevent the parent from suspending immediately after */ 1744 /* Prevent the parent from suspending immediately after */
1745 else if (udev->parent) { 1745 else if (udev->parent)
1746 udev->parent->last_busy = jiffies; 1746 udev->parent->last_busy = jiffies;
1747 }
1748 } 1747 }
1749 1748
1750 /* Runtime suspend for a USB interface doesn't mean anything. */ 1749 /* Runtime suspend for a USB interface doesn't mean anything. */
@@ -1786,21 +1785,19 @@ static int usb_runtime_idle(struct device *dev)
1786 return 0; 1785 return 0;
1787} 1786}
1788 1787
1789static struct dev_pm_ops usb_bus_pm_ops = { 1788static const struct dev_pm_ops usb_bus_pm_ops = {
1790 .runtime_suspend = usb_runtime_suspend, 1789 .runtime_suspend = usb_runtime_suspend,
1791 .runtime_resume = usb_runtime_resume, 1790 .runtime_resume = usb_runtime_resume,
1792 .runtime_idle = usb_runtime_idle, 1791 .runtime_idle = usb_runtime_idle,
1793}; 1792};
1794 1793
1795#else
1796
1797#define usb_bus_pm_ops (*(struct dev_pm_ops *) NULL)
1798
1799#endif /* CONFIG_USB_SUSPEND */ 1794#endif /* CONFIG_USB_SUSPEND */
1800 1795
1801struct bus_type usb_bus_type = { 1796struct bus_type usb_bus_type = {
1802 .name = "usb", 1797 .name = "usb",
1803 .match = usb_device_match, 1798 .match = usb_device_match,
1804 .uevent = usb_uevent, 1799 .uevent = usb_uevent,
1800#ifdef CONFIG_USB_SUSPEND
1805 .pm = &usb_bus_pm_ops, 1801 .pm = &usb_bus_pm_ops,
1802#endif
1806}; 1803};