aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <felipe.balbi@nokia.com>2010-01-21 08:33:58 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:45 -0500
commitab3bbfa1af64a978ffff45861a1b694313a03537 (patch)
treefcc9552dbfe99cf0fd7a31d08ae53256916eb1dc
parentda5108e1a350c84b185b5f11aa58fea93a204fe0 (diff)
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 <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/musb/musb_core.c25
1 files changed, 12 insertions, 13 deletions
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:
2004 musb->irq_wake = 0; 2004 musb->irq_wake = 0;
2005 } 2005 }
2006 2006
2007 pr_info("%s: USB %s mode controller at %p using %s, IRQ %d\n",
2008 musb_driver_name,
2009 ({char *s;
2010 switch (musb->board_mode) {
2011 case MUSB_HOST: s = "Host"; break;
2012 case MUSB_PERIPHERAL: s = "Peripheral"; break;
2013 default: s = "OTG"; break;
2014 }; s; }),
2015 ctrl,
2016 (is_dma_capable() && musb->dma_controller)
2017 ? "DMA" : "PIO",
2018 musb->nIrq);
2019
2020 /* host side needs more setup */ 2007 /* host side needs more setup */
2021 if (is_host_enabled(musb)) { 2008 if (is_host_enabled(musb)) {
2022 struct usb_hcd *hcd = musb_to_hcd(musb); 2009 struct usb_hcd *hcd = musb_to_hcd(musb);
@@ -2079,6 +2066,18 @@ bad_config:
2079 if (status) 2066 if (status)
2080 goto fail2; 2067 goto fail2;
2081 2068
2069 dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n",
2070 ({char *s;
2071 switch (musb->board_mode) {
2072 case MUSB_HOST: s = "Host"; break;
2073 case MUSB_PERIPHERAL: s = "Peripheral"; break;
2074 default: s = "OTG"; break;
2075 }; s; }),
2076 ctrl,
2077 (is_dma_capable() && musb->dma_controller)
2078 ? "DMA" : "PIO",
2079 musb->nIrq);
2080
2082 return 0; 2081 return 0;
2083 2082
2084fail2: 2083fail2: