Commit 6904b845 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi

usb: musb: remove a few is_dma_capable() in init/exit code

This patch removes is_dma_capable() and an ifdef in the init/exit path
around init/de-init of the dma_controller. Since we have the empty stubs
in the PIO code we can call it without gcc trouble. Earlier we had an
ifdef and the is_dma_capable() macro where gcc ignored the if (0) path
even that the function was not around :)
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a6a20885
...@@ -1764,7 +1764,7 @@ static void musb_free(struct musb *musb) ...@@ -1764,7 +1764,7 @@ static void musb_free(struct musb *musb)
disable_irq_wake(musb->nIrq); disable_irq_wake(musb->nIrq);
free_irq(musb->nIrq, musb); free_irq(musb->nIrq, musb);
} }
if (is_dma_capable() && musb->dma_controller) if (musb->dma_controller)
dma_controller_destroy(musb->dma_controller); dma_controller_destroy(musb->dma_controller);
musb_host_free(musb); musb_host_free(musb);
...@@ -1840,12 +1840,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -1840,12 +1840,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
pm_runtime_get_sync(musb->controller); pm_runtime_get_sync(musb->controller);
#ifndef CONFIG_MUSB_PIO_ONLY
if (use_dma && dev->dma_mask) if (use_dma && dev->dma_mask)
musb->dma_controller = dma_controller_create(musb, musb->mregs); musb->dma_controller = dma_controller_create(musb, musb->mregs);
#endif
/* ideally this would be abstracted in platform setup */ /* ideally this would be abstracted in platform setup */
if (!is_dma_capable() || !musb->dma_controller) if (!musb->dma_controller)
dev->dma_mask = NULL; dev->dma_mask = NULL;
/* be sure interrupts are disabled before connecting ISR */ /* be sure interrupts are disabled before connecting ISR */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment