aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-28 18:30:03 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-28 18:30:03 -0400
commitff49896aa45de286f3cbfda800fc92665374546a (patch)
treed05c73f3e13449a4668a5ca8ff63de6f8f73a807
parent69820e01aa756b8d228143d997f71523c1e97984 (diff)
parente7ecf069d4730d5ec4cc91a531eb85c9604142bd (diff)
Merge tag 'for-usb-next-2013-08-27-15-07' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next
Sarah writes: xhci: Fix build breakage and new warnings. Hi Greg, This first patch should fix the build breakage Sedat Dilek reported. Apologizes for not including this patch before commit 0730d52a86919300a39a2be37f6c140997dfb82f "xhci:prevent "callbacks suppressed" when debug is not enabled" The second patch fixes a new build warning introduced by commit c8476fb855434c733099079063990e5bfa7ecad6 "usb: xhci: Disable runtime PM suspend for quirky controllers", which was caught by the 0day build system. Sarah Sharp
-rw-r--r--drivers/usb/host/xhci.c6
-rw-r--r--include/linux/device.h16
2 files changed, 15 insertions, 7 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 349d3460a17a..49b6edb84a79 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3557,7 +3557,6 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
3557{ 3557{
3558 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 3558 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
3559 struct xhci_virt_device *virt_dev; 3559 struct xhci_virt_device *virt_dev;
3560 struct device *dev = hcd->self.controller;
3561 unsigned long flags; 3560 unsigned long flags;
3562 u32 state; 3561 u32 state;
3563 int i, ret; 3562 int i, ret;
@@ -3569,7 +3568,7 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
3569 * if no devices remain. 3568 * if no devices remain.
3570 */ 3569 */
3571 if (xhci->quirks & XHCI_RESET_ON_RESUME) 3570 if (xhci->quirks & XHCI_RESET_ON_RESUME)
3572 pm_runtime_put_noidle(dev); 3571 pm_runtime_put_noidle(hcd->self.controller);
3573#endif 3572#endif
3574 3573
3575 ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); 3574 ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__);
@@ -3645,7 +3644,6 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci)
3645int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) 3644int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
3646{ 3645{
3647 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 3646 struct xhci_hcd *xhci = hcd_to_xhci(hcd);
3648 struct device *dev = hcd->self.controller;
3649 unsigned long flags; 3647 unsigned long flags;
3650 int timeleft; 3648 int timeleft;
3651 int ret; 3649 int ret;
@@ -3705,7 +3703,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
3705 * suspend if there is a device attached. 3703 * suspend if there is a device attached.
3706 */ 3704 */
3707 if (xhci->quirks & XHCI_RESET_ON_RESUME) 3705 if (xhci->quirks & XHCI_RESET_ON_RESUME)
3708 pm_runtime_get_noresume(dev); 3706 pm_runtime_get_noresume(hcd->self.controller);
3709#endif 3707#endif
3710 3708
3711 /* Is this a LS or FS device under a HS hub? */ 3709 /* Is this a LS or FS device under a HS hub? */
diff --git a/include/linux/device.h b/include/linux/device.h
index 22b546a58591..7d960d581e9c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1099,7 +1099,8 @@ do { \
1099 dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) 1099 dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__)
1100#define dev_info_ratelimited(dev, fmt, ...) \ 1100#define dev_info_ratelimited(dev, fmt, ...) \
1101 dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) 1101 dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__)
1102#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) 1102#if defined(CONFIG_DYNAMIC_DEBUG)
1103/* descriptor check is first to prevent flooding with "callbacks suppressed" */
1103#define dev_dbg_ratelimited(dev, fmt, ...) \ 1104#define dev_dbg_ratelimited(dev, fmt, ...) \
1104do { \ 1105do { \
1105 static DEFINE_RATELIMIT_STATE(_rs, \ 1106 static DEFINE_RATELIMIT_STATE(_rs, \
@@ -1108,8 +1109,17 @@ do { \
1108 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ 1109 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
1109 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ 1110 if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
1110 __ratelimit(&_rs)) \ 1111 __ratelimit(&_rs)) \
1111 __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ 1112 __dynamic_dev_dbg(&descriptor, dev, fmt, \
1112 ##__VA_ARGS__); \ 1113 ##__VA_ARGS__); \
1114} while (0)
1115#elif defined(DEBUG)
1116#define dev_dbg_ratelimited(dev, fmt, ...) \
1117do { \
1118 static DEFINE_RATELIMIT_STATE(_rs, \
1119 DEFAULT_RATELIMIT_INTERVAL, \
1120 DEFAULT_RATELIMIT_BURST); \
1121 if (__ratelimit(&_rs)) \
1122 dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
1113} while (0) 1123} while (0)
1114#else 1124#else
1115#define dev_dbg_ratelimited(dev, fmt, ...) \ 1125#define dev_dbg_ratelimited(dev, fmt, ...) \