xhci:prevent "callbacks suppressed" when debug is not enabled

When debug is not enabled and dev_dbg() will expand to nothing,
log might be flooded with "callbacks suppressed". If it was not
done on purpose, better to use dev_dbg_ratelimited() instead.

Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:
Dmitry Kasatkin 2013-08-27 17:47:35 +03:00 committed by Sarah Sharp
parent dcf06a0368
commit 0730d52a86

View File

@ -3087,14 +3087,10 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
* to set the polling interval (once the API is added). * to set the polling interval (once the API is added).
*/ */
if (xhci_interval != ep_interval) { if (xhci_interval != ep_interval) {
if (printk_ratelimit()) dev_dbg_ratelimited(&urb->dev->dev,
dev_dbg(&urb->dev->dev, "Driver uses different interval" "Driver uses different interval (%d microframe%s) than xHCI (%d microframe%s)\n",
" (%d microframe%s) than xHCI " ep_interval, ep_interval == 1 ? "" : "s",
"(%d microframe%s)\n", xhci_interval, xhci_interval == 1 ? "" : "s");
ep_interval,
ep_interval == 1 ? "" : "s",
xhci_interval,
xhci_interval == 1 ? "" : "s");
urb->interval = xhci_interval; urb->interval = xhci_interval;
/* Convert back to frames for LS/FS devices */ /* Convert back to frames for LS/FS devices */
if (urb->dev->speed == USB_SPEED_LOW || if (urb->dev->speed == USB_SPEED_LOW ||
@ -3876,14 +3872,10 @@ int xhci_queue_isoc_tx_prepare(struct xhci_hcd *xhci, gfp_t mem_flags,
* to set the polling interval (once the API is added). * to set the polling interval (once the API is added).
*/ */
if (xhci_interval != ep_interval) { if (xhci_interval != ep_interval) {
if (printk_ratelimit()) dev_dbg_ratelimited(&urb->dev->dev,
dev_dbg(&urb->dev->dev, "Driver uses different interval" "Driver uses different interval (%d microframe%s) than xHCI (%d microframe%s)\n",
" (%d microframe%s) than xHCI " ep_interval, ep_interval == 1 ? "" : "s",
"(%d microframe%s)\n", xhci_interval, xhci_interval == 1 ? "" : "s");
ep_interval,
ep_interval == 1 ? "" : "s",
xhci_interval,
xhci_interval == 1 ? "" : "s");
urb->interval = xhci_interval; urb->interval = xhci_interval;
/* Convert back to frames for LS/FS devices */ /* Convert back to frames for LS/FS devices */
if (urb->dev->speed == USB_SPEED_LOW || if (urb->dev->speed == USB_SPEED_LOW ||