diff options
author | Sebastian Andrzej Siewior | 2013-06-19 17:38:11 +0200 |
---|---|---|
committer | Felipe Balbi | 2013-07-29 12:53:18 +0200 |
commit | 66c01883ef19bf4537b16931567b7d35c65356ad (patch) | |
tree | 99da616e10bf13181dad379d97748980784c74e6 /drivers/usb/musb/musb_core.c | |
parent | usb: musb: musbhsdma: drop the controller check in dma_controller_destroy() (diff) | |
download | kernel-qcow2-linux-66c01883ef19bf4537b16931567b7d35c65356ad.tar.gz kernel-qcow2-linux-66c01883ef19bf4537b16931567b7d35c65356ad.tar.xz kernel-qcow2-linux-66c01883ef19bf4537b16931567b7d35c65356ad.zip |
usb: musb: dma: merge ->start/stop into create/destroy
The core code creates a controller and immediately after that it calls
the ->start() callback. This one might drop an error but nobody cares.
The same thing happens in the destroy corner: First ->stop() called
followed by destroy callback. So why not merge those two into the same
function since there is no difference.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 29a24ced6748..a4434d22ef13 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1764,12 +1764,8 @@ static void musb_free(struct musb *musb) disable_irq_wake(musb->nIrq); free_irq(musb->nIrq, musb); } - if (is_dma_capable() && musb->dma_controller) { - struct dma_controller *c = musb->dma_controller; - - (void) c->stop(c); - dma_controller_destroy(c); - } + if (is_dma_capable() && musb->dma_controller) + dma_controller_destroy(musb->dma_controller); musb_host_free(musb); } @@ -1845,14 +1841,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) pm_runtime_get_sync(musb->controller); #ifndef CONFIG_MUSB_PIO_ONLY - if (use_dma && dev->dma_mask) { - struct dma_controller *c; - - c = dma_controller_create(musb, musb->mregs); - musb->dma_controller = c; - if (c) - (void) c->start(c); - } + if (use_dma && dev->dma_mask) + musb->dma_controller = dma_controller_create(musb, musb->mregs); #endif /* ideally this would be abstracted in platform setup */ if (!is_dma_capable() || !musb->dma_controller) |