summaryrefslogtreecommitdiff
path: root/drivers/usb/host/isp1760-hcd.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-01-21 00:55:45 +0200
committerFelipe Balbi <balbi@ti.com>2015-01-27 09:38:24 -0600
commit10c73f09dc9be7c7373483f9965dd535c5788f09 (patch)
treecb282fc89f4c83b11ab658f26e6992eb4d354778 /drivers/usb/host/isp1760-hcd.c
parentc3cc40ccea2cd3533a90d915b40f304843642df9 (diff)
usb: isp1760: Move removal cleanup code to isp1760-hcd.c
The removal cleanup code is duplicated between the different bus glues. Move it to a central location. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host/isp1760-hcd.c')
-rw-r--r--drivers/usb/host/isp1760-hcd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index e4a94242328e..74987276ac73 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -2263,6 +2263,16 @@ err_put:
return ERR_PTR(ret);
}
+void isp1760_unregister(struct device *dev)
+{
+ struct usb_hcd *hcd = dev_get_drvdata(dev);
+
+ usb_remove_hcd(hcd);
+ iounmap(hcd->regs);
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
+ usb_put_hcd(hcd);
+}
+
MODULE_DESCRIPTION("Driver for the ISP1760 USB-controller from NXP");
MODULE_AUTHOR("Sebastian Siewior <bigeasy@linuxtronix.de>");
MODULE_LICENSE("GPL v2");