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
379 u8 devctl, u8 power)379 u8 devctl, u8 power)
380{380{
381 irqreturn_t handled = IRQ_NONE;381 irqreturn_t handled = IRQ_NONE;
382 void __iomem *mbase = musb->mregs;
383 382
384 DBG(3, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl,383 DBG(3, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl,
385 int_usb);384 int_usb);
@@ -394,6 +393,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 8 unmodified lines
394 393
395 if (devctl & MUSB_DEVCTL_HM) {394 if (devctl & MUSB_DEVCTL_HM) {
396#ifdef CONFIG_USB_MUSB_HDRC_HCD395#ifdef CONFIG_USB_MUSB_HDRC_HCD
396 void __iomem *mbase = musb->mregs;
397
397 switch (musb->xceiv->state) {398 switch (musb->xceiv->state) {
398 case OTG_STATE_A_SUSPEND:399 case OTG_STATE_A_SUSPEND:
399 /* remote wakeup? later, GetPortStatus400 /* remote wakeup? later, GetPortStatus
@@ -471,6 +472,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 71 unmodified lines
471#ifdef CONFIG_USB_MUSB_HDRC_HCD472#ifdef CONFIG_USB_MUSB_HDRC_HCD
472 /* see manual for the order of the tests */473 /* see manual for the order of the tests */
473 if (int_usb & MUSB_INTR_SESSREQ) {474 if (int_usb & MUSB_INTR_SESSREQ) {
475 void __iomem *mbase = musb->mregs;
476
474 DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb));477 DBG(1, "SESSION_REQUEST (%s)\n", otg_state_string(musb));
475 478
476 /* IRQ arrives from ID pin sense or (later, if VBUS power479 /* 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
519 case OTG_STATE_A_WAIT_BCON:522 case OTG_STATE_A_WAIT_BCON:
520 case OTG_STATE_A_WAIT_VRISE:523 case OTG_STATE_A_WAIT_VRISE:
521 if (musb->vbuserr_retry) {524 if (musb->vbuserr_retry) {
525 void __iomem *mbase = musb->mregs;
526
522 musb->vbuserr_retry--;527 musb->vbuserr_retry--;
523 ignore = 1;528 ignore = 1;
524 devctl |= MUSB_DEVCTL_SESSION;529 devctl |= MUSB_DEVCTL_SESSION;
@@ -622,6 +627,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, · 97 unmodified lines
622 627
623 if (int_usb & MUSB_INTR_CONNECT) {628 if (int_usb & MUSB_INTR_CONNECT) {
624 struct usb_hcd *hcd = musb_to_hcd(musb);629 struct usb_hcd *hcd = musb_to_hcd(musb);
630 void __iomem *mbase = musb->mregs;
625 631
626 handled = IRQ_HANDLED;632 handled = IRQ_HANDLED;
627 musb->is_active = 1;633 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