提交 ff49896a 编写于 作者: G Greg Kroah-Hartman

Merge tag 'for-usb-next-2013-08-27-15-07' of...

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
0730d52a "xhci:prevent "callbacks suppressed"
when debug is not enabled"

The second patch fixes a new build warning introduced by commit
c8476fb8 "usb: xhci: Disable runtime PM suspend
for quirky controllers", which was caught by the 0day build system.

Sarah Sharp
...@@ -3557,7 +3557,6 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) ...@@ -3557,7 +3557,6 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
{ {
struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct xhci_virt_device *virt_dev; struct xhci_virt_device *virt_dev;
struct device *dev = hcd->self.controller;
unsigned long flags; unsigned long flags;
u32 state; u32 state;
int i, ret; int i, ret;
...@@ -3569,7 +3568,7 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) ...@@ -3569,7 +3568,7 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
* if no devices remain. * if no devices remain.
*/ */
if (xhci->quirks & XHCI_RESET_ON_RESUME) if (xhci->quirks & XHCI_RESET_ON_RESUME)
pm_runtime_put_noidle(dev); pm_runtime_put_noidle(hcd->self.controller);
#endif #endif
ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); 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) ...@@ -3645,7 +3644,6 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci)
int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
{ {
struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct device *dev = hcd->self.controller;
unsigned long flags; unsigned long flags;
int timeleft; int timeleft;
int ret; int ret;
...@@ -3705,7 +3703,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) ...@@ -3705,7 +3703,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
* suspend if there is a device attached. * suspend if there is a device attached.
*/ */
if (xhci->quirks & XHCI_RESET_ON_RESUME) if (xhci->quirks & XHCI_RESET_ON_RESUME)
pm_runtime_get_noresume(dev); pm_runtime_get_noresume(hcd->self.controller);
#endif #endif
/* Is this a LS or FS device under a HS hub? */ /* Is this a LS or FS device under a HS hub? */
......
...@@ -1099,7 +1099,8 @@ do { \ ...@@ -1099,7 +1099,8 @@ do { \
dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__)
#define dev_info_ratelimited(dev, fmt, ...) \ #define dev_info_ratelimited(dev, fmt, ...) \
dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__)
#if defined(CONFIG_DYNAMIC_DEBUG) || defined(DEBUG) #if defined(CONFIG_DYNAMIC_DEBUG)
/* descriptor check is first to prevent flooding with "callbacks suppressed" */
#define dev_dbg_ratelimited(dev, fmt, ...) \ #define dev_dbg_ratelimited(dev, fmt, ...) \
do { \ do { \
static DEFINE_RATELIMIT_STATE(_rs, \ static DEFINE_RATELIMIT_STATE(_rs, \
...@@ -1108,8 +1109,17 @@ do { \ ...@@ -1108,8 +1109,17 @@ do { \
DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \
__ratelimit(&_rs)) \ __ratelimit(&_rs)) \
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ __dynamic_dev_dbg(&descriptor, dev, fmt, \
##__VA_ARGS__); \ ##__VA_ARGS__); \
} while (0)
#elif defined(DEBUG)
#define dev_dbg_ratelimited(dev, fmt, ...) \
do { \
static DEFINE_RATELIMIT_STATE(_rs, \
DEFAULT_RATELIMIT_INTERVAL, \
DEFAULT_RATELIMIT_BURST); \
if (__ratelimit(&_rs)) \
dev_printk(KERN_DEBUG, dev, fmt, ##__VA_ARGS__); \
} while (0) } while (0)
#else #else
#define dev_dbg_ratelimited(dev, fmt, ...) \ #define dev_dbg_ratelimited(dev, fmt, ...) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册