From: Felipe Balbi Date: Thu, 21 Jan 2010 13:33:58 +0000 (+0200) Subject: USB: musb: only print info message if probe() is successful X-Git-Tag: Ubuntu-goldfish-3.4.0-4.27~8291^2~55 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ab3bbfa1af64a978ffff45861a1b694313a03537;p=mirror_ubuntu-zesty-kernel.git USB: musb: only print info message if probe() is successful we were printing the info about musb probe too early where it was still possible for things to go wrong. Move the down right before the return 0 statement. While at that also convert pr_info to dev_info. Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index de7b3770f6ee..0f13dedc50a1 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2004,19 +2004,6 @@ bad_config: musb->irq_wake = 0; } - pr_info("%s: USB %s mode controller at %p using %s, IRQ %d\n", - musb_driver_name, - ({char *s; - switch (musb->board_mode) { - case MUSB_HOST: s = "Host"; break; - case MUSB_PERIPHERAL: s = "Peripheral"; break; - default: s = "OTG"; break; - }; s; }), - ctrl, - (is_dma_capable() && musb->dma_controller) - ? "DMA" : "PIO", - musb->nIrq); - /* host side needs more setup */ if (is_host_enabled(musb)) { struct usb_hcd *hcd = musb_to_hcd(musb); @@ -2079,6 +2066,18 @@ bad_config: if (status) goto fail2; + dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n", + ({char *s; + switch (musb->board_mode) { + case MUSB_HOST: s = "Host"; break; + case MUSB_PERIPHERAL: s = "Peripheral"; break; + default: s = "OTG"; break; + }; s; }), + ctrl, + (is_dma_capable() && musb->dma_controller) + ? "DMA" : "PIO", + musb->nIrq); + return 0; fail2: