[PATCH 6/8] usb: host: ehci-atmel: unregister host on device remove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 drivers/usb/host/ehci-atmel.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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[] = {
-- 
2.19.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux