aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-03-04 17:05:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:31 -0400
commit749da5f82fe33ff68dd4aa1a5e35cd9aa6246dab (patch)
tree2c0a7c689ab6a58f3a799ae51e41ac885e212194 /drivers/usb/musb/musb_core.c
parent288ead45fa6637e959015d055304f521cbbc0575 (diff)
USB: straighten out port feature vs. port status usage
This patch (as1349b) clears up the confusion in many USB host controller drivers between port features and port statuses. In mosty cases it's true that the status bit is in the position given by the corresponding feature value, but that's not always true and it's not guaranteed in the USB spec. There's no functional change, just replacing expressions of the form (1 << USB_PORT_FEAT_x) with USB_PORT_STAT_x, which has the same value. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 705cc4ad8737..ced6d9ea9af3 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -353,8 +353,7 @@ void musb_hnp_stop(struct musb *musb)
353 * which cause occasional OPT A "Did not receive reset after connect" 353 * which cause occasional OPT A "Did not receive reset after connect"
354 * errors. 354 * errors.
355 */ 355 */
356 musb->port1_status &= 356 musb->port1_status &= ~(USB_PORT_STAT_C_CONNECTION << 16);
357 ~(1 << USB_PORT_FEAT_C_CONNECTION);
358} 357}
359 358
360#endif 359#endif
@@ -530,8 +529,8 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
530 musb_writeb(mbase, MUSB_DEVCTL, devctl); 529 musb_writeb(mbase, MUSB_DEVCTL, devctl);
531 } else { 530 } else {
532 musb->port1_status |= 531 musb->port1_status |=
533 (1 << USB_PORT_FEAT_OVER_CURRENT) 532 USB_PORT_STAT_OVERCURRENT
534 | (1 << USB_PORT_FEAT_C_OVER_CURRENT); 533 | (USB_PORT_STAT_C_OVERCURRENT << 16);
535 } 534 }
536 break; 535 break;
537 default: 536 default: