Fixes below compilation warning when host only configuration is
selected.
drivers/usb/musb/musb_core.c: In function 'musb_stage0_irq':
drivers/usb/musb/musb_core.c:711: warning: unused variable 'mbase'

Also removed definition of 'mbase' from multiple places to only
at function top.

Signed-off-by: Ajay Kumar Gupta <[email protected]>
---
 drivers/usb/musb/musb_core.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f0ff893..7cc8398 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -455,6 +455,9 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 
int_usb,
                                u8 devctl, u8 power)
 {
        irqreturn_t handled = IRQ_NONE;
+#ifdef CONFIG_USB_MUSB_HDRC_HCD
+       void __iomem    *mbase = musb->mregs;
+#endif
 
        DBG(3, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl,
                int_usb);
@@ -469,8 +472,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 
int_usb,
 
                if (devctl & MUSB_DEVCTL_HM) {
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
-                       void __iomem *mbase = musb->mregs;
-
                        switch (musb->xceiv->state) {
                        case OTG_STATE_A_SUSPEND:
                                /* remote wakeup?  later, GetPortStatus
@@ -548,8 +549,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 
int_usb,
 #ifdef CONFIG_USB_MUSB_HDRC_HCD
        /* see manual for the order of the tests */
        if (int_usb & MUSB_INTR_SESSREQ) {
-               void __iomem *mbase = musb->mregs;
-
                DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb));
 
                /* IRQ arrives from ID pin sense or (later, if VBUS power
@@ -598,8 +597,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 
int_usb,
                case OTG_STATE_A_WAIT_BCON:
                case OTG_STATE_A_WAIT_VRISE:
                        if (musb->vbuserr_retry) {
-                               void __iomem *mbase = musb->mregs;
-
                                musb->vbuserr_retry--;
                                ignore = 1;
                                devctl |= MUSB_DEVCTL_SESSION;
@@ -703,7 +700,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 
int_usb,
 
        if (int_usb & MUSB_INTR_CONNECT) {
                struct usb_hcd *hcd = musb_to_hcd(musb);
-               void __iomem *mbase = musb->mregs;
 
                handled = IRQ_HANDLED;
                musb->is_active = 1;
-- 
1.6.2.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to