aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-01-20 17:55:42 -0500
committerFelipe Balbi <balbi@ti.com>2015-01-27 10:38:11 -0500
commitfcead8431d245af312afcbcbfbfc34a0fec77cd9 (patch)
treea9592a92ff51b3478d8ca1a90705a757cbff1c4f /drivers/usb/host
parent8a8b96f487e8b7ba0a9384df8e7ecc514152114c (diff)
usb: isp1760: Retrieve pdev memory resource from hcd at remove time
The platform driver remove function needs to release the memory resource requested at probe time. Instead of retrieving the resource from the platform device, retrieve it from the usb_hcd. This mimics the behaviour of the PCI and OF glues, and will make it easier to share code between all three glue layers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/isp1760-if.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index b5bcb99ffde5..025edf2fb05a 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -373,15 +373,11 @@ out:
373 373
374static int isp1760_plat_remove(struct platform_device *pdev) 374static int isp1760_plat_remove(struct platform_device *pdev)
375{ 375{
376 struct resource *mem_res;
377 resource_size_t mem_size;
378 struct usb_hcd *hcd = platform_get_drvdata(pdev); 376 struct usb_hcd *hcd = platform_get_drvdata(pdev);
379 377
380 usb_remove_hcd(hcd); 378 usb_remove_hcd(hcd);
381 379
382 mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 380 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
383 mem_size = resource_size(mem_res);
384 release_mem_region(mem_res->start, mem_size);
385 381
386 usb_put_hcd(hcd); 382 usb_put_hcd(hcd);
387 383