aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/da8xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/da8xx.c')
-rw-r--r--drivers/usb/musb/da8xx.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 2613bfdb09b6..8bd9566f3fbb 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -294,6 +294,7 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
294{ 294{
295 struct musb *musb = hci; 295 struct musb *musb = hci;
296 void __iomem *reg_base = musb->ctrl_base; 296 void __iomem *reg_base = musb->ctrl_base;
297 struct usb_otg *otg = musb->xceiv->otg;
297 unsigned long flags; 298 unsigned long flags;
298 irqreturn_t ret = IRQ_NONE; 299 irqreturn_t ret = IRQ_NONE;
299 u32 status; 300 u32 status;
@@ -351,14 +352,14 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)
351 WARNING("VBUS error workaround (delay coming)\n"); 352 WARNING("VBUS error workaround (delay coming)\n");
352 } else if (is_host_enabled(musb) && drvvbus) { 353 } else if (is_host_enabled(musb) && drvvbus) {
353 MUSB_HST_MODE(musb); 354 MUSB_HST_MODE(musb);
354 musb->xceiv->default_a = 1; 355 otg->default_a = 1;
355 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE; 356 musb->xceiv->state = OTG_STATE_A_WAIT_VRISE;
356 portstate(musb->port1_status |= USB_PORT_STAT_POWER); 357 portstate(musb->port1_status |= USB_PORT_STAT_POWER);
357 del_timer(&otg_workaround); 358 del_timer(&otg_workaround);
358 } else { 359 } else {
359 musb->is_active = 0; 360 musb->is_active = 0;
360 MUSB_DEV_MODE(musb); 361 MUSB_DEV_MODE(musb);
361 musb->xceiv->default_a = 0; 362 otg->default_a = 0;
362 musb->xceiv->state = OTG_STATE_B_IDLE; 363 musb->xceiv->state = OTG_STATE_B_IDLE;
363 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER); 364 portstate(musb->port1_status &= ~USB_PORT_STAT_POWER);
364 } 365 }
@@ -424,7 +425,7 @@ static int da8xx_musb_init(struct musb *musb)
424 goto fail; 425 goto fail;
425 426
426 usb_nop_xceiv_register(); 427 usb_nop_xceiv_register();
427 musb->xceiv = otg_get_transceiver(); 428 musb->xceiv = usb_get_transceiver();
428 if (!musb->xceiv) 429 if (!musb->xceiv)
429 goto fail; 430 goto fail;
430 431
@@ -457,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb)
457 458
458 phy_off(); 459 phy_off();
459 460
460 otg_put_transceiver(musb->xceiv); 461 usb_put_transceiver(musb->xceiv);
461 usb_nop_xceiv_unregister(); 462 usb_nop_xceiv_unregister();
462 463
463 return 0; 464 return 0;
@@ -478,7 +479,7 @@ static const struct musb_platform_ops da8xx_ops = {
478 479
479static u64 da8xx_dmamask = DMA_BIT_MASK(32); 480static u64 da8xx_dmamask = DMA_BIT_MASK(32);
480 481
481static int __init da8xx_probe(struct platform_device *pdev) 482static int __devinit da8xx_probe(struct platform_device *pdev)
482{ 483{
483 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 484 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
484 struct platform_device *musb; 485 struct platform_device *musb;
@@ -562,7 +563,7 @@ err0:
562 return ret; 563 return ret;
563} 564}
564 565
565static int __exit da8xx_remove(struct platform_device *pdev) 566static int __devexit da8xx_remove(struct platform_device *pdev)
566{ 567{
567 struct da8xx_glue *glue = platform_get_drvdata(pdev); 568 struct da8xx_glue *glue = platform_get_drvdata(pdev);
568 569
@@ -576,7 +577,8 @@ static int __exit da8xx_remove(struct platform_device *pdev)
576} 577}
577 578
578static struct platform_driver da8xx_driver = { 579static struct platform_driver da8xx_driver = {
579 .remove = __exit_p(da8xx_remove), 580 .probe = da8xx_probe,
581 .remove = __devexit_p(da8xx_remove),
580 .driver = { 582 .driver = {
581 .name = "musb-da8xx", 583 .name = "musb-da8xx",
582 }, 584 },
@@ -588,9 +590,9 @@ MODULE_LICENSE("GPL v2");
588 590
589static int __init da8xx_init(void) 591static int __init da8xx_init(void)
590{ 592{
591 return platform_driver_probe(&da8xx_driver, da8xx_probe); 593 return platform_driver_register(&da8xx_driver);
592} 594}
593subsys_initcall(da8xx_init); 595module_init(da8xx_init);
594 596
595static void __exit da8xx_exit(void) 597static void __exit da8xx_exit(void)
596{ 598{