summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-atmel.c6
-rw-r--r--drivers/usb/host/ehci-hcd.c16
-rw-r--r--drivers/usb/host/ohci-hcd.c8
-rw-r--r--drivers/usb/host/xhci-hcd.c6
4 files changed, 26 insertions, 10 deletions
diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
index 11b1a894e1..cc9636c4b7 100644
--- a/drivers/usb/host/ehci-atmel.c
+++ b/drivers/usb/host/ehci-atmel.c
@@ -46,6 +46,7 @@ static void atmel_stop_clock(void)
static int atmel_ehci_probe(struct device_d *dev)
{
+ struct resource *iores;
struct ehci_data data;
iclk = clk_get(dev, "ehci_clk");
@@ -67,7 +68,10 @@ static int atmel_ehci_probe(struct device_d *dev)
data.flags = 0;
- data.hccr = dev_request_mem_region(dev, 0);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ data.hccr = IOMEM(iores->start);
ehci_register(dev, &data);
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 91c6d73c30..8ea26e3591 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1334,6 +1334,7 @@ int ehci_register(struct device_d *dev, struct ehci_data *data)
static int ehci_probe(struct device_d *dev)
{
+ struct resource *iores;
struct ehci_data data = {};
struct ehci_platform_data *pdata = dev->platform_data;
struct device_node *dn = dev->device_node;
@@ -1350,12 +1351,17 @@ static int ehci_probe(struct device_d *dev)
*/
data.flags = EHCI_HAS_TT;
- data.hccr = dev_request_mem_region(dev, 0);
- if (IS_ERR(data.hccr))
- return PTR_ERR(data.hccr);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ data.hccr = IOMEM(iores->start);
- if (dev->num_resources > 1)
- data.hcor = dev_request_mem_region(dev, 1);
+ if (dev->num_resources > 1) {
+ iores = dev_request_mem_resource(dev, 1);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ data.hcor = IOMEM(iores->start);
+ }
else
data.hcor = NULL;
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 1d511b7563..612c3a1033 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1793,6 +1793,7 @@ static int ohci_init(struct usb_host *host)
static int ohci_probe(struct device_d *dev)
{
+ struct resource *iores;
struct usb_host *host;
struct ohci *ohci;
@@ -1818,9 +1819,10 @@ static int ohci_probe(struct device_d *dev)
usb_register_host(host);
- ohci->regs = dev_request_mem_region(dev, 0);
- if (IS_ERR(ohci->regs))
- return PTR_ERR(ohci->regs);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ ohci->regs = IOMEM(iores->start);
return 0;
}
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index a44a1a4dff..2b808cc875 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -1509,9 +1509,13 @@ int xhci_register(struct device_d *dev, struct xhci_data *data)
static int xhci_probe(struct device_d *dev)
{
+ struct resource *iores;
struct xhci_data data = {};
- data.regs = dev_request_mem_region(dev, 0);
+ iores = dev_request_mem_resource(dev, 0);
+ if (IS_ERR(iores))
+ return PTR_ERR(iores);
+ data.regs = IOMEM(iores->start);
return xhci_register(dev, &data);
}