Commit 63c5b4ca authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi

usb: musb: do not change dev's dma_mask

Commit 8d2421e6 ("usb: musb: kill global and static for multi instance")
removed the global dma_mask copy and replaced by parent's DMA mask. The
problem here is that if the parent does not have a dma_mask then
musb_remove() goes kaboom.
Instead trying to fix this I was thinking we do we need to erase
dma_mask in the first place?
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e9eb2e08
...@@ -1843,10 +1843,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) ...@@ -1843,10 +1843,6 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
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);
/* ideally this would be abstracted in platform setup */
if (!musb->dma_controller)
dev->dma_mask = NULL;
/* be sure interrupts are disabled before connecting ISR */ /* be sure interrupts are disabled before connecting ISR */
musb_platform_disable(musb); musb_platform_disable(musb);
musb_generic_disable(musb); musb_generic_disable(musb);
...@@ -1993,9 +1989,6 @@ static int musb_remove(struct platform_device *pdev) ...@@ -1993,9 +1989,6 @@ static int musb_remove(struct platform_device *pdev)
musb_free(musb); musb_free(musb);
device_init_wakeup(dev, 0); device_init_wakeup(dev, 0);
#ifndef CONFIG_MUSB_PIO_ONLY
dma_set_mask(dev, *dev->parent->dma_mask);
#endif
return 0; return 0;
} }
......
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