History

usb: musb: core: declare mbase only where it's used

... and avoid a compilation if we disable host side of musb.

Felipe Balbi committed 16 years ago

Commit aa471451 parent 7f4bca41 file · +7 −1Browse files

Unified · Split

drivers/usb/musb/musb_core.c+7−1
@@ -379,7 +379,6 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 378 unmodified lines
379379 u8 devctl, u8 power)
380380 {
381381 irqreturn_t handled = IRQ_NONE;
382− void __iomem *mbase = musb->mregs;
383382
384383 DBG(3, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl,
385384 int_usb);
@@ -394,6 +393,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 8 unmodified lines
394393
395394 if (devctl & MUSB_DEVCTL_HM) {
396395 #ifdef CONFIG_USB_MUSB_HDRC_HCD
396+ void __iomem *mbase = musb->mregs;
397+
397398 switch (musb->xceiv->state) {
398399 case OTG_STATE_A_SUSPEND:
399400 /* remote wakeup? later, GetPortStatus
@@ -471,6 +472,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 71 unmodified lines
471472 #ifdef CONFIG_USB_MUSB_HDRC_HCD
472473 /* see manual for the order of the tests */
473474 if (int_usb & MUSB_INTR_SESSREQ) {
475+ void __iomem *mbase = musb->mregs;
476+
474477 DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb));
475478
476479 /* IRQ arrives from ID pin sense or (later, if VBUS power
@@ -519,6 +522,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 42 unmodified lines
519522 case OTG_STATE_A_WAIT_BCON:
520523 case OTG_STATE_A_WAIT_VRISE:
521524 if (musb->vbuserr_retry) {
525+ void __iomem *mbase = musb->mregs;
526+
522527 musb->vbuserr_retry--;
523528 ignore = 1;
524529 devctl |= MUSB_DEVCTL_SESSION;
@@ -622,6 +627,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 97 unmodified lines
622627
623628 if (int_usb & MUSB_INTR_CONNECT) {
624629 struct usb_hcd *hcd = musb_to_hcd(musb);
630+ void __iomem *mbase = musb->mregs;
625631
626632 handled = IRQ_HANDLED;
627633 musb->is_active = 1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t