xhci: replace printk(KERN_DEBUG ...)
This patch replaces the calls to printk(KERN_DEBUG ...) with either calls to xhci_dbg() or calls to pr_debug(), depending on whether the xhci_hcd structure is available at callsite, so that the correspoding debugging messages are not enabled by default when CONFIG_DYNAMIC_DEBUG option is set but rather can be enabled dynamically taking advantage of the dynamic debugging feature. Also, it adds a newline at the end of debugging messages in case there is not, so that messages don't appear broken when printed. Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
This commit is contained in:

committed by
Sarah Sharp

parent
38a532a621
commit
5c1127d320
@@ -1170,27 +1170,25 @@ static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev,
|
|||||||
struct xhci_virt_device *virt_dev;
|
struct xhci_virt_device *virt_dev;
|
||||||
|
|
||||||
if (!hcd || (check_ep && !ep) || !udev) {
|
if (!hcd || (check_ep && !ep) || !udev) {
|
||||||
printk(KERN_DEBUG "xHCI %s called with invalid args\n",
|
pr_debug("xHCI %s called with invalid args\n", func);
|
||||||
func);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
if (!udev->parent) {
|
if (!udev->parent) {
|
||||||
printk(KERN_DEBUG "xHCI %s called for root hub\n",
|
pr_debug("xHCI %s called for root hub\n", func);
|
||||||
func);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
xhci = hcd_to_xhci(hcd);
|
xhci = hcd_to_xhci(hcd);
|
||||||
if (check_virt_dev) {
|
if (check_virt_dev) {
|
||||||
if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
|
if (!udev->slot_id || !xhci->devs[udev->slot_id]) {
|
||||||
printk(KERN_DEBUG "xHCI %s called with unaddressed "
|
xhci_dbg(xhci, "xHCI %s called with unaddressed device\n",
|
||||||
"device\n", func);
|
func);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
virt_dev = xhci->devs[udev->slot_id];
|
virt_dev = xhci->devs[udev->slot_id];
|
||||||
if (virt_dev->udev != udev) {
|
if (virt_dev->udev != udev) {
|
||||||
printk(KERN_DEBUG "xHCI %s called with udev and "
|
xhci_dbg(xhci, "xHCI %s called with udev and "
|
||||||
"virt_dev does not match\n", func);
|
"virt_dev does not match\n", func);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@@ -4941,12 +4939,12 @@ static int __init xhci_hcd_init(void)
|
|||||||
|
|
||||||
retval = xhci_register_pci();
|
retval = xhci_register_pci();
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
printk(KERN_DEBUG "Problem registering PCI driver.");
|
pr_debug("Problem registering PCI driver.\n");
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
retval = xhci_register_plat();
|
retval = xhci_register_plat();
|
||||||
if (retval < 0) {
|
if (retval < 0) {
|
||||||
printk(KERN_DEBUG "Problem registering platform driver.");
|
pr_debug("Problem registering platform driver.\n");
|
||||||
goto unreg_pci;
|
goto unreg_pci;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user