diff options
author | Afzal Mohammed <afzal@ti.com> | 2012-11-02 12:32:28 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-11-06 07:59:39 -0500 |
commit | 12fc9266dec3706ece7c4aafefc60d429149c3bd (patch) | |
tree | 0c1cb877fd53b055821eef65d0351bb264ac61a8 /drivers/usb/musb | |
parent | 2f7711642559851c187d09795a3eb51c2bde36ec (diff) |
usb: musb: dsps: remove platform callback
dsps wrapper is dt only, it cannot execute platform callbacks.
Presence of this would cause NULL dereference, hence remove it.
Signed-off-by: Afzal Mohammed <afzal@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_dsps.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 2d2cd37bc7ba..465bbf7e384d 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c | |||
@@ -365,11 +365,9 @@ static irqreturn_t dsps_interrupt(int irq, void *hci) | |||
365 | static int dsps_musb_init(struct musb *musb) | 365 | static int dsps_musb_init(struct musb *musb) |
366 | { | 366 | { |
367 | struct device *dev = musb->controller; | 367 | struct device *dev = musb->controller; |
368 | struct musb_hdrc_platform_data *plat = dev->platform_data; | ||
369 | struct platform_device *pdev = to_platform_device(dev); | 368 | struct platform_device *pdev = to_platform_device(dev); |
370 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); | 369 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); |
371 | const struct dsps_musb_wrapper *wrp = glue->wrp; | 370 | const struct dsps_musb_wrapper *wrp = glue->wrp; |
372 | struct omap_musb_board_data *data = plat->board_data; | ||
373 | void __iomem *reg_base = musb->ctrl_base; | 371 | void __iomem *reg_base = musb->ctrl_base; |
374 | u32 rev, val; | 372 | u32 rev, val; |
375 | int status; | 373 | int status; |
@@ -394,10 +392,6 @@ static int dsps_musb_init(struct musb *musb) | |||
394 | /* Reset the musb */ | 392 | /* Reset the musb */ |
395 | dsps_writel(reg_base, wrp->control, (1 << wrp->reset)); | 393 | dsps_writel(reg_base, wrp->control, (1 << wrp->reset)); |
396 | 394 | ||
397 | /* Start the on-chip PHY and its PLL. */ | ||
398 | if (data->set_phy_power) | ||
399 | data->set_phy_power(1); | ||
400 | |||
401 | musb->isr = dsps_interrupt; | 395 | musb->isr = dsps_interrupt; |
402 | 396 | ||
403 | /* reset the otgdisable bit, needed for host mode to work */ | 397 | /* reset the otgdisable bit, needed for host mode to work */ |
@@ -418,17 +412,11 @@ err0: | |||
418 | static int dsps_musb_exit(struct musb *musb) | 412 | static int dsps_musb_exit(struct musb *musb) |
419 | { | 413 | { |
420 | struct device *dev = musb->controller; | 414 | struct device *dev = musb->controller; |
421 | struct musb_hdrc_platform_data *plat = dev->platform_data; | ||
422 | struct omap_musb_board_data *data = plat->board_data; | ||
423 | struct platform_device *pdev = to_platform_device(dev); | 415 | struct platform_device *pdev = to_platform_device(dev); |
424 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); | 416 | struct dsps_glue *glue = dev_get_drvdata(dev->parent); |
425 | 417 | ||
426 | del_timer_sync(&glue->timer[pdev->id]); | 418 | del_timer_sync(&glue->timer[pdev->id]); |
427 | 419 | ||
428 | /* Shutdown the on-chip PHY and its PLL. */ | ||
429 | if (data->set_phy_power) | ||
430 | data->set_phy_power(0); | ||
431 | |||
432 | /* NOP driver needs change if supporting dual instance */ | 420 | /* NOP driver needs change if supporting dual instance */ |
433 | usb_put_phy(musb->xceiv); | 421 | usb_put_phy(musb->xceiv); |
434 | usb_nop_xceiv_unregister(); | 422 | usb_nop_xceiv_unregister(); |
@@ -649,25 +637,11 @@ static int __devexit dsps_remove(struct platform_device *pdev) | |||
649 | #ifdef CONFIG_PM_SLEEP | 637 | #ifdef CONFIG_PM_SLEEP |
650 | static int dsps_suspend(struct device *dev) | 638 | static int dsps_suspend(struct device *dev) |
651 | { | 639 | { |
652 | struct musb_hdrc_platform_data *plat = dev->platform_data; | ||
653 | struct omap_musb_board_data *data = plat->board_data; | ||
654 | |||
655 | /* Shutdown the on-chip PHY and its PLL. */ | ||
656 | if (data->set_phy_power) | ||
657 | data->set_phy_power(0); | ||
658 | |||
659 | return 0; | 640 | return 0; |
660 | } | 641 | } |
661 | 642 | ||
662 | static int dsps_resume(struct device *dev) | 643 | static int dsps_resume(struct device *dev) |
663 | { | 644 | { |
664 | struct musb_hdrc_platform_data *plat = dev->platform_data; | ||
665 | struct omap_musb_board_data *data = plat->board_data; | ||
666 | |||
667 | /* Start the on-chip PHY and its PLL. */ | ||
668 | if (data->set_phy_power) | ||
669 | data->set_phy_power(1); | ||
670 | |||
671 | return 0; | 645 | return 0; |
672 | } | 646 | } |
673 | #endif | 647 | #endif |