summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2017-02-01 21:30:13 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-03 10:05:10 +0100
commite945953dd736b5f385fbb4b7ab368271dff5714a (patch)
treea2cd9434e564189ef06377c407b54be42ff511b9 /drivers/usb/musb
parenta994ce2d7e66008381a0b184c73be9ae9b72eb5c (diff)
downloadlinux-e945953dd736b5f385fbb4b7ab368271dff5714a.tar.bz2
usb: musb: remove musb_generic_disable function
musb_generic_disable() only has two lines of code. So remove it and let the callers directly call those two lines. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index fca288bbc800..b1f082f42112 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1040,16 +1040,6 @@ static void musb_enable_interrupts(struct musb *musb)
}
-static void musb_generic_disable(struct musb *musb)
-{
- void __iomem *mbase = musb->mregs;
-
- musb_disable_interrupts(musb);
-
- /* off */
- musb_writeb(mbase, MUSB_DEVCTL, 0);
-}
-
/*
* Program the HDRC to start (enable interrupts, dma, etc.).
*/
@@ -1106,8 +1096,8 @@ void musb_stop(struct musb *musb)
{
/* stop IRQs, timers, ... */
musb_platform_disable(musb);
- musb_generic_disable(musb);
- musb_dbg(musb, "HDRC disabled");
+ musb_disable_interrupts(musb);
+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
/* FIXME
* - mark host and/or peripheral drivers unusable/inactive
@@ -2312,7 +2302,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
/* be sure interrupts are disabled before connecting ISR */
musb_platform_disable(musb);
- musb_generic_disable(musb);
+ musb_disable_interrupts(musb);
+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
/* Init IRQ workqueue before request_irq */
INIT_DELAYED_WORK(&musb->irq_work, musb_irq_work);
@@ -2486,11 +2477,13 @@ static int musb_remove(struct platform_device *pdev)
pm_runtime_get_sync(musb->controller);
musb_host_cleanup(musb);
musb_gadget_cleanup(musb);
+
spin_lock_irqsave(&musb->lock, flags);
musb_platform_disable(musb);
- musb_generic_disable(musb);
- spin_unlock_irqrestore(&musb->lock, flags);
+ musb_disable_interrupts(musb);
musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
+ spin_unlock_irqrestore(&musb->lock, flags);
+
pm_runtime_dont_use_autosuspend(musb->controller);
pm_runtime_put_sync(musb->controller);
pm_runtime_disable(musb->controller);
@@ -2665,7 +2658,8 @@ static int musb_suspend(struct device *dev)
unsigned long flags;
musb_platform_disable(musb);
- musb_generic_disable(musb);
+ musb_disable_interrupts(musb);
+ musb_writeb(musb->mregs, MUSB_DEVCTL, 0);
WARN_ON(!list_empty(&musb->pending_list));
spin_lock_irqsave(&musb->lock, flags);