summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-10-26 10:52:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-29 11:26:35 +0100
commit94f808bafaac85bdceb70d74375549eaddcc209c (patch)
tree35ffdbd79c8a586dd75c2a19266f458473ee207b
parent610a2b2b696268f00d798e68db51a2cf90642648 (diff)
downloadbarebox-94f808bafaac85bdceb70d74375549eaddcc209c.tar.gz
barebox-94f808bafaac85bdceb70d74375549eaddcc209c.tar.xz
usb: host: ehci-atmel: unregister host on device remove
The ehci code does DMA and really must be properly stopped when we leave barebox, so call ehci_unregister on device removal. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/usb/host/ehci-atmel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 36c9166e74..6c88d646c9 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -120,10 +120,14 @@ static int atmel_ehci_probe(struct device_d *dev)
static void atmel_ehci_remove(struct device_d *dev)
{
+ struct atmel_ehci_priv *atehci = dev->priv;
+
+ ehci_unregister(atehci->ehci);
+
/*
* Stop the USB clocks.
*/
- atmel_stop_clock(dev->priv);
+ atmel_stop_clock(atehci);
}
static const struct of_device_id atmel_ehci_dt_ids[] = {