diff options
Diffstat (limited to 'drivers/usb/host/ehci-sead3.c')
-rw-r--r-- | drivers/usb/host/ehci-sead3.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/usb/host/ehci-sead3.c b/drivers/usb/host/ehci-sead3.c index 0c9e43cfaff5..efad02d947f2 100644 --- a/drivers/usb/host/ehci-sead3.c +++ b/drivers/usb/host/ehci-sead3.c | |||
@@ -112,17 +112,11 @@ static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev) | |||
112 | hcd->rsrc_start = res->start; | 112 | hcd->rsrc_start = res->start; |
113 | hcd->rsrc_len = resource_size(res); | 113 | hcd->rsrc_len = resource_size(res); |
114 | 114 | ||
115 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 115 | hcd->regs = devm_request_and_ioremap(&pdev->dev, res); |
116 | pr_debug("request_mem_region failed"); | ||
117 | ret = -EBUSY; | ||
118 | goto err1; | ||
119 | } | ||
120 | |||
121 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); | ||
122 | if (!hcd->regs) { | 116 | if (!hcd->regs) { |
123 | pr_debug("ioremap failed"); | 117 | pr_debug("ioremap failed"); |
124 | ret = -ENOMEM; | 118 | ret = -ENOMEM; |
125 | goto err2; | 119 | goto err1; |
126 | } | 120 | } |
127 | 121 | ||
128 | /* Root hub has integrated TT. */ | 122 | /* Root hub has integrated TT. */ |
@@ -135,9 +129,6 @@ static int ehci_hcd_sead3_drv_probe(struct platform_device *pdev) | |||
135 | return ret; | 129 | return ret; |
136 | } | 130 | } |
137 | 131 | ||
138 | iounmap(hcd->regs); | ||
139 | err2: | ||
140 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | ||
141 | err1: | 132 | err1: |
142 | usb_put_hcd(hcd); | 133 | usb_put_hcd(hcd); |
143 | return ret; | 134 | return ret; |
@@ -148,8 +139,6 @@ static int ehci_hcd_sead3_drv_remove(struct platform_device *pdev) | |||
148 | struct usb_hcd *hcd = platform_get_drvdata(pdev); | 139 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
149 | 140 | ||
150 | usb_remove_hcd(hcd); | 141 | usb_remove_hcd(hcd); |
151 | iounmap(hcd->regs); | ||
152 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); | ||
153 | usb_put_hcd(hcd); | 142 | usb_put_hcd(hcd); |
154 | platform_set_drvdata(pdev, NULL); | 143 | platform_set_drvdata(pdev, NULL); |
155 | 144 | ||