diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-ath79.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-cns3xxx.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-grlib.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ixp4xx.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-octeon.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-pmcmsp.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ppc-of.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-w90x900.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-xilinx-of.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/fhci-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ath79.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-cns3xxx.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-da8xx.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-octeon.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ppc-of.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ppc-soc.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-sa1111.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-sm501.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/ohci-tmio.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/oxu210hp-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/uhci-grlib.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/whci/init.c | 2 |
23 files changed, 34 insertions, 35 deletions
diff --git a/drivers/usb/host/ehci-ath79.c b/drivers/usb/host/ehci-ath79.c index 98cc8a13169c..eab3d7059fbe 100644 --- a/drivers/usb/host/ehci-ath79.c +++ b/drivers/usb/host/ehci-ath79.c | |||
@@ -146,7 +146,7 @@ static int ehci_ath79_probe(struct platform_device *pdev) | |||
146 | return -ENOMEM; | 146 | return -ENOMEM; |
147 | 147 | ||
148 | hcd->rsrc_start = res->start; | 148 | hcd->rsrc_start = res->start; |
149 | hcd->rsrc_len = res->end - res->start + 1; | 149 | hcd->rsrc_len = resource_size(res); |
150 | 150 | ||
151 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 151 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
152 | dev_dbg(&pdev->dev, "controller already in use\n"); | 152 | dev_dbg(&pdev->dev, "controller already in use\n"); |
diff --git a/drivers/usb/host/ehci-cns3xxx.c b/drivers/usb/host/ehci-cns3xxx.c index d41745c6f0c4..6536abdea6e6 100644 --- a/drivers/usb/host/ehci-cns3xxx.c +++ b/drivers/usb/host/ehci-cns3xxx.c | |||
@@ -107,7 +107,7 @@ static int cns3xxx_ehci_probe(struct platform_device *pdev) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | hcd->rsrc_start = res->start; | 109 | hcd->rsrc_start = res->start; |
110 | hcd->rsrc_len = res->end - res->start + 1; | 110 | hcd->rsrc_len = resource_size(res); |
111 | 111 | ||
112 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 112 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
113 | driver->description)) { | 113 | driver->description)) { |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index f380bf97e5af..34a3140d1e5f 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -100,7 +100,7 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, | |||
100 | goto err2; | 100 | goto err2; |
101 | } | 101 | } |
102 | hcd->rsrc_start = res->start; | 102 | hcd->rsrc_start = res->start; |
103 | hcd->rsrc_len = res->end - res->start + 1; | 103 | hcd->rsrc_len = resource_size(res); |
104 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 104 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
105 | driver->description)) { | 105 | driver->description)) { |
106 | dev_dbg(&pdev->dev, "controller already in use\n"); | 106 | dev_dbg(&pdev->dev, "controller already in use\n"); |
diff --git a/drivers/usb/host/ehci-grlib.c b/drivers/usb/host/ehci-grlib.c index 93b230dc51a2..fdfd8c5b639b 100644 --- a/drivers/usb/host/ehci-grlib.c +++ b/drivers/usb/host/ehci-grlib.c | |||
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_grlib_probe(struct platform_device *op) | |||
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | 131 | ||
132 | hcd->rsrc_start = res.start; | 132 | hcd->rsrc_start = res.start; |
133 | hcd->rsrc_len = res.end - res.start + 1; | 133 | hcd->rsrc_len = resource_size(&res); |
134 | 134 | ||
135 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 135 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
136 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); | 136 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/ehci-ixp4xx.c b/drivers/usb/host/ehci-ixp4xx.c index 50e600d26e28..c4460f3d009f 100644 --- a/drivers/usb/host/ehci-ixp4xx.c +++ b/drivers/usb/host/ehci-ixp4xx.c | |||
@@ -100,7 +100,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev) | |||
100 | goto fail_request_resource; | 100 | goto fail_request_resource; |
101 | } | 101 | } |
102 | hcd->rsrc_start = res->start; | 102 | hcd->rsrc_start = res->start; |
103 | hcd->rsrc_len = res->end - res->start + 1; | 103 | hcd->rsrc_len = resource_size(res); |
104 | 104 | ||
105 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 105 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
106 | driver->description)) { | 106 | driver->description)) { |
diff --git a/drivers/usb/host/ehci-octeon.c b/drivers/usb/host/ehci-octeon.c index ff55757ba7d8..c3ba3ed5f3a6 100644 --- a/drivers/usb/host/ehci-octeon.c +++ b/drivers/usb/host/ehci-octeon.c | |||
@@ -124,7 +124,7 @@ static int ehci_octeon_drv_probe(struct platform_device *pdev) | |||
124 | return -ENOMEM; | 124 | return -ENOMEM; |
125 | 125 | ||
126 | hcd->rsrc_start = res_mem->start; | 126 | hcd->rsrc_start = res_mem->start; |
127 | hcd->rsrc_len = res_mem->end - res_mem->start + 1; | 127 | hcd->rsrc_len = resource_size(res_mem); |
128 | 128 | ||
129 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 129 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
130 | OCTEON_EHCI_HCD_NAME)) { | 130 | OCTEON_EHCI_HCD_NAME)) { |
diff --git a/drivers/usb/host/ehci-pmcmsp.c b/drivers/usb/host/ehci-pmcmsp.c index cd69099cda19..e8d54de44acc 100644 --- a/drivers/usb/host/ehci-pmcmsp.c +++ b/drivers/usb/host/ehci-pmcmsp.c | |||
@@ -124,7 +124,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev) | |||
124 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 124 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
125 | if (res == NULL) | 125 | if (res == NULL) |
126 | return -ENOMEM; | 126 | return -ENOMEM; |
127 | res_len = res->end - res->start + 1; | 127 | res_len = resource_size(res); |
128 | if (!request_mem_region(res->start, res_len, "mab regs")) | 128 | if (!request_mem_region(res->start, res_len, "mab regs")) |
129 | return -EBUSY; | 129 | return -EBUSY; |
130 | 130 | ||
@@ -140,7 +140,7 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev) | |||
140 | retval = -ENOMEM; | 140 | retval = -ENOMEM; |
141 | goto err2; | 141 | goto err2; |
142 | } | 142 | } |
143 | res_len = res->end - res->start + 1; | 143 | res_len = resource_size(res); |
144 | if (!request_mem_region(res->start, res_len, "usbid regs")) { | 144 | if (!request_mem_region(res->start, res_len, "usbid regs")) { |
145 | retval = -EBUSY; | 145 | retval = -EBUSY; |
146 | goto err2; | 146 | goto err2; |
@@ -154,13 +154,13 @@ static int usb_hcd_msp_map_regs(struct mspusb_device *dev) | |||
154 | return 0; | 154 | return 0; |
155 | err3: | 155 | err3: |
156 | res = platform_get_resource(pdev, IORESOURCE_MEM, 2); | 156 | res = platform_get_resource(pdev, IORESOURCE_MEM, 2); |
157 | res_len = res->end - res->start + 1; | 157 | res_len = resource_size(res); |
158 | release_mem_region(res->start, res_len); | 158 | release_mem_region(res->start, res_len); |
159 | err2: | 159 | err2: |
160 | iounmap(dev->mab_regs); | 160 | iounmap(dev->mab_regs); |
161 | err1: | 161 | err1: |
162 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 162 | res = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
163 | res_len = res->end - res->start + 1; | 163 | res_len = resource_size(res); |
164 | release_mem_region(res->start, res_len); | 164 | release_mem_region(res->start, res_len); |
165 | dev_err(&pdev->dev, "Failed to map non-EHCI regs.\n"); | 165 | dev_err(&pdev->dev, "Failed to map non-EHCI regs.\n"); |
166 | return retval; | 166 | return retval; |
@@ -194,7 +194,7 @@ int usb_hcd_msp_probe(const struct hc_driver *driver, | |||
194 | goto err1; | 194 | goto err1; |
195 | } | 195 | } |
196 | hcd->rsrc_start = res->start; | 196 | hcd->rsrc_start = res->start; |
197 | hcd->rsrc_len = res->end - res->start + 1; | 197 | hcd->rsrc_len = resource_size(res); |
198 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) { | 198 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) { |
199 | retval = -EBUSY; | 199 | retval = -EBUSY; |
200 | goto err1; | 200 | goto err1; |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 8552db6c29c9..41d11fe14252 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
@@ -130,7 +130,7 @@ static int __devinit ehci_hcd_ppc_of_probe(struct platform_device *op) | |||
130 | return -ENOMEM; | 130 | return -ENOMEM; |
131 | 131 | ||
132 | hcd->rsrc_start = res.start; | 132 | hcd->rsrc_start = res.start; |
133 | hcd->rsrc_len = res.end - res.start + 1; | 133 | hcd->rsrc_len = resource_size(&res); |
134 | 134 | ||
135 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 135 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
136 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); | 136 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/ehci-w90x900.c b/drivers/usb/host/ehci-w90x900.c index 52a027aaa370..d661cf7de140 100644 --- a/drivers/usb/host/ehci-w90x900.c +++ b/drivers/usb/host/ehci-w90x900.c | |||
@@ -41,7 +41,7 @@ static int __devinit usb_w90x900_probe(const struct hc_driver *driver, | |||
41 | } | 41 | } |
42 | 42 | ||
43 | hcd->rsrc_start = res->start; | 43 | hcd->rsrc_start = res->start; |
44 | hcd->rsrc_len = res->end - res->start + 1; | 44 | hcd->rsrc_len = resource_size(res); |
45 | 45 | ||
46 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 46 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
47 | retval = -EBUSY; | 47 | retval = -EBUSY; |
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c index a64d6d66d760..32793ce3d9e9 100644 --- a/drivers/usb/host/ehci-xilinx-of.c +++ b/drivers/usb/host/ehci-xilinx-of.c | |||
@@ -174,7 +174,7 @@ static int __devinit ehci_hcd_xilinx_of_probe(struct platform_device *op) | |||
174 | return -ENOMEM; | 174 | return -ENOMEM; |
175 | 175 | ||
176 | hcd->rsrc_start = res.start; | 176 | hcd->rsrc_start = res.start; |
177 | hcd->rsrc_len = res.end - res.start + 1; | 177 | hcd->rsrc_len = resource_size(&res); |
178 | 178 | ||
179 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 179 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
180 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); | 180 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 19223c7449e1..572ea53b0226 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
@@ -605,7 +605,7 @@ static int __devinit of_fhci_probe(struct platform_device *ofdev) | |||
605 | goto err_regs; | 605 | goto err_regs; |
606 | } | 606 | } |
607 | 607 | ||
608 | hcd->regs = ioremap(usb_regs.start, usb_regs.end - usb_regs.start + 1); | 608 | hcd->regs = ioremap(usb_regs.start, resource_size(&usb_regs)); |
609 | if (!hcd->regs) { | 609 | if (!hcd->regs) { |
610 | dev_err(dev, "could not ioremap regs\n"); | 610 | dev_err(dev, "could not ioremap regs\n"); |
611 | ret = -ENOMEM; | 611 | ret = -ENOMEM; |
diff --git a/drivers/usb/host/ohci-ath79.c b/drivers/usb/host/ohci-ath79.c index ffea3e7cb0a8..c620c50f6770 100644 --- a/drivers/usb/host/ohci-ath79.c +++ b/drivers/usb/host/ohci-ath79.c | |||
@@ -93,8 +93,8 @@ static int ohci_ath79_probe(struct platform_device *pdev) | |||
93 | ret = -ENODEV; | 93 | ret = -ENODEV; |
94 | goto err_put_hcd; | 94 | goto err_put_hcd; |
95 | } | 95 | } |
96 | hcd->rsrc_start = res->start; | 96 | hcd->rsrc_start = res->start; |
97 | hcd->rsrc_len = res->end - res->start + 1; | 97 | hcd->rsrc_len = resource_size(res); |
98 | 98 | ||
99 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 99 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
100 | dev_dbg(&pdev->dev, "controller already in use\n"); | 100 | dev_dbg(&pdev->dev, "controller already in use\n"); |
diff --git a/drivers/usb/host/ohci-cns3xxx.c b/drivers/usb/host/ohci-cns3xxx.c index f05ef87e934c..5a00a1e1c6ca 100644 --- a/drivers/usb/host/ohci-cns3xxx.c +++ b/drivers/usb/host/ohci-cns3xxx.c | |||
@@ -100,7 +100,7 @@ static int cns3xxx_ohci_probe(struct platform_device *pdev) | |||
100 | goto err1; | 100 | goto err1; |
101 | } | 101 | } |
102 | hcd->rsrc_start = res->start; | 102 | hcd->rsrc_start = res->start; |
103 | hcd->rsrc_len = res->end - res->start + 1; | 103 | hcd->rsrc_len = resource_size(res); |
104 | 104 | ||
105 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 105 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
106 | driver->description)) { | 106 | driver->description)) { |
diff --git a/drivers/usb/host/ohci-da8xx.c b/drivers/usb/host/ohci-da8xx.c index d22fb4d577b7..6aca2c4453f7 100644 --- a/drivers/usb/host/ohci-da8xx.c +++ b/drivers/usb/host/ohci-da8xx.c | |||
@@ -322,7 +322,7 @@ static int usb_hcd_da8xx_probe(const struct hc_driver *driver, | |||
322 | goto err2; | 322 | goto err2; |
323 | } | 323 | } |
324 | hcd->rsrc_start = mem->start; | 324 | hcd->rsrc_start = mem->start; |
325 | hcd->rsrc_len = mem->end - mem->start + 1; | 325 | hcd->rsrc_len = resource_size(mem); |
326 | 326 | ||
327 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 327 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
328 | dev_dbg(&pdev->dev, "request_mem_region failed\n"); | 328 | dev_dbg(&pdev->dev, "request_mem_region failed\n"); |
diff --git a/drivers/usb/host/ohci-octeon.c b/drivers/usb/host/ohci-octeon.c index e4ddfaf8870f..d8b45647d1dc 100644 --- a/drivers/usb/host/ohci-octeon.c +++ b/drivers/usb/host/ohci-octeon.c | |||
@@ -135,7 +135,7 @@ static int ohci_octeon_drv_probe(struct platform_device *pdev) | |||
135 | return -ENOMEM; | 135 | return -ENOMEM; |
136 | 136 | ||
137 | hcd->rsrc_start = res_mem->start; | 137 | hcd->rsrc_start = res_mem->start; |
138 | hcd->rsrc_len = res_mem->end - res_mem->start + 1; | 138 | hcd->rsrc_len = resource_size(res_mem); |
139 | 139 | ||
140 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, | 140 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, |
141 | OCTEON_OHCI_HCD_NAME)) { | 141 | OCTEON_OHCI_HCD_NAME)) { |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 1ca1821320f4..0c12f4e14dcd 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
@@ -110,7 +110,7 @@ static int __devinit ohci_hcd_ppc_of_probe(struct platform_device *op) | |||
110 | return -ENOMEM; | 110 | return -ENOMEM; |
111 | 111 | ||
112 | hcd->rsrc_start = res.start; | 112 | hcd->rsrc_start = res.start; |
113 | hcd->rsrc_len = res.end - res.start + 1; | 113 | hcd->rsrc_len = resource_size(&res); |
114 | 114 | ||
115 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 115 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
116 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); | 116 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index 89e670e38c10..c0f595c44487 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c | |||
@@ -56,7 +56,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver, | |||
56 | if (!hcd) | 56 | if (!hcd) |
57 | return -ENOMEM; | 57 | return -ENOMEM; |
58 | hcd->rsrc_start = res->start; | 58 | hcd->rsrc_start = res->start; |
59 | hcd->rsrc_len = res->end - res->start + 1; | 59 | hcd->rsrc_len = resource_size(res); |
60 | 60 | ||
61 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 61 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
62 | pr_debug("%s: request_mem_region failed\n", __FILE__); | 62 | pr_debug("%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c index d8eb3bdafabb..4204d9720d23 100644 --- a/drivers/usb/host/ohci-sa1111.c +++ b/drivers/usb/host/ohci-sa1111.c | |||
@@ -131,7 +131,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver, | |||
131 | if (!hcd) | 131 | if (!hcd) |
132 | return -ENOMEM; | 132 | return -ENOMEM; |
133 | hcd->rsrc_start = dev->res.start; | 133 | hcd->rsrc_start = dev->res.start; |
134 | hcd->rsrc_len = dev->res.end - dev->res.start + 1; | 134 | hcd->rsrc_len = resource_size(&dev->res); |
135 | 135 | ||
136 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 136 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
137 | dbg("request_mem_region failed"); | 137 | dbg("request_mem_region failed"); |
diff --git a/drivers/usb/host/ohci-sm501.c b/drivers/usb/host/ohci-sm501.c index 041d30f30c10..78918ca0da23 100644 --- a/drivers/usb/host/ohci-sm501.c +++ b/drivers/usb/host/ohci-sm501.c | |||
@@ -103,8 +103,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev) | |||
103 | goto err0; | 103 | goto err0; |
104 | } | 104 | } |
105 | 105 | ||
106 | if (!request_mem_region(mem->start, mem->end - mem->start + 1, | 106 | if (!request_mem_region(mem->start, resource_size(mem), pdev->name)) { |
107 | pdev->name)) { | ||
108 | dev_err(dev, "request_mem_region failed\n"); | 107 | dev_err(dev, "request_mem_region failed\n"); |
109 | retval = -EBUSY; | 108 | retval = -EBUSY; |
110 | goto err0; | 109 | goto err0; |
@@ -126,7 +125,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev) | |||
126 | 125 | ||
127 | if (!dma_declare_coherent_memory(dev, mem->start, | 126 | if (!dma_declare_coherent_memory(dev, mem->start, |
128 | mem->start - mem->parent->start, | 127 | mem->start - mem->parent->start, |
129 | (mem->end - mem->start) + 1, | 128 | resource_size(mem), |
130 | DMA_MEMORY_MAP | | 129 | DMA_MEMORY_MAP | |
131 | DMA_MEMORY_EXCLUSIVE)) { | 130 | DMA_MEMORY_EXCLUSIVE)) { |
132 | dev_err(dev, "cannot declare coherent memory\n"); | 131 | dev_err(dev, "cannot declare coherent memory\n"); |
@@ -149,7 +148,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev) | |||
149 | } | 148 | } |
150 | 149 | ||
151 | hcd->rsrc_start = res->start; | 150 | hcd->rsrc_start = res->start; |
152 | hcd->rsrc_len = res->end - res->start + 1; | 151 | hcd->rsrc_len = resource_size(res); |
153 | 152 | ||
154 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) { | 153 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) { |
155 | dev_err(dev, "request_mem_region failed\n"); | 154 | dev_err(dev, "request_mem_region failed\n"); |
@@ -185,7 +184,7 @@ err3: | |||
185 | err2: | 184 | err2: |
186 | dma_release_declared_memory(dev); | 185 | dma_release_declared_memory(dev); |
187 | err1: | 186 | err1: |
188 | release_mem_region(mem->start, mem->end - mem->start + 1); | 187 | release_mem_region(mem->start, resource_size(mem)); |
189 | err0: | 188 | err0: |
190 | return retval; | 189 | return retval; |
191 | } | 190 | } |
@@ -201,7 +200,7 @@ static int ohci_hcd_sm501_drv_remove(struct platform_device *pdev) | |||
201 | dma_release_declared_memory(&pdev->dev); | 200 | dma_release_declared_memory(&pdev->dev); |
202 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 201 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
203 | if (mem) | 202 | if (mem) |
204 | release_mem_region(mem->start, mem->end - mem->start + 1); | 203 | release_mem_region(mem->start, resource_size(mem)); |
205 | 204 | ||
206 | /* mask interrupts and disable power */ | 205 | /* mask interrupts and disable power */ |
207 | 206 | ||
diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c index 3558491dd87d..57ad1271fc9b 100644 --- a/drivers/usb/host/ohci-tmio.c +++ b/drivers/usb/host/ohci-tmio.c | |||
@@ -208,13 +208,13 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | hcd->rsrc_start = regs->start; | 210 | hcd->rsrc_start = regs->start; |
211 | hcd->rsrc_len = regs->end - regs->start + 1; | 211 | hcd->rsrc_len = resource_size(regs); |
212 | 212 | ||
213 | tmio = hcd_to_tmio(hcd); | 213 | tmio = hcd_to_tmio(hcd); |
214 | 214 | ||
215 | spin_lock_init(&tmio->lock); | 215 | spin_lock_init(&tmio->lock); |
216 | 216 | ||
217 | tmio->ccr = ioremap(config->start, config->end - config->start + 1); | 217 | tmio->ccr = ioremap(config->start, resource_size(config)); |
218 | if (!tmio->ccr) { | 218 | if (!tmio->ccr) { |
219 | ret = -ENOMEM; | 219 | ret = -ENOMEM; |
220 | goto err_ioremap_ccr; | 220 | goto err_ioremap_ccr; |
@@ -228,7 +228,7 @@ static int __devinit ohci_hcd_tmio_drv_probe(struct platform_device *dev) | |||
228 | 228 | ||
229 | if (!dma_declare_coherent_memory(&dev->dev, sram->start, | 229 | if (!dma_declare_coherent_memory(&dev->dev, sram->start, |
230 | sram->start, | 230 | sram->start, |
231 | sram->end - sram->start + 1, | 231 | resource_size(sram), |
232 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) { | 232 | DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) { |
233 | ret = -EBUSY; | 233 | ret = -EBUSY; |
234 | goto err_dma_declare; | 234 | goto err_dma_declare; |
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 5fbe997dc6df..dcd889803f0f 100644 --- a/drivers/usb/host/oxu210hp-hcd.c +++ b/drivers/usb/host/oxu210hp-hcd.c | |||
@@ -3828,7 +3828,7 @@ static int oxu_drv_probe(struct platform_device *pdev) | |||
3828 | return -ENODEV; | 3828 | return -ENODEV; |
3829 | } | 3829 | } |
3830 | memstart = res->start; | 3830 | memstart = res->start; |
3831 | memlen = res->end - res->start + 1; | 3831 | memlen = resource_size(res); |
3832 | dev_dbg(&pdev->dev, "MEM resource %lx-%lx\n", memstart, memlen); | 3832 | dev_dbg(&pdev->dev, "MEM resource %lx-%lx\n", memstart, memlen); |
3833 | if (!request_mem_region(memstart, memlen, | 3833 | if (!request_mem_region(memstart, memlen, |
3834 | oxu_hc_driver.description)) { | 3834 | oxu_hc_driver.description)) { |
diff --git a/drivers/usb/host/uhci-grlib.c b/drivers/usb/host/uhci-grlib.c index d01c1e227681..f7a62138e3e0 100644 --- a/drivers/usb/host/uhci-grlib.c +++ b/drivers/usb/host/uhci-grlib.c | |||
@@ -111,7 +111,7 @@ static int __devinit uhci_hcd_grlib_probe(struct platform_device *op) | |||
111 | return -ENOMEM; | 111 | return -ENOMEM; |
112 | 112 | ||
113 | hcd->rsrc_start = res.start; | 113 | hcd->rsrc_start = res.start; |
114 | hcd->rsrc_len = res.end - res.start + 1; | 114 | hcd->rsrc_len = resource_size(&res); |
115 | 115 | ||
116 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { | 116 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
117 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); | 117 | printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__); |
diff --git a/drivers/usb/host/whci/init.c b/drivers/usb/host/whci/init.c index f7582e8e2169..d3e13b640d4b 100644 --- a/drivers/usb/host/whci/init.c +++ b/drivers/usb/host/whci/init.c | |||
@@ -178,7 +178,7 @@ void whc_clean_up(struct whc *whc) | |||
178 | if (whc->qset_pool) | 178 | if (whc->qset_pool) |
179 | dma_pool_destroy(whc->qset_pool); | 179 | dma_pool_destroy(whc->qset_pool); |
180 | 180 | ||
181 | len = whc->umc->resource.end - whc->umc->resource.start + 1; | 181 | len = resource_size(&whc->umc->resource); |
182 | if (whc->base) | 182 | if (whc->base) |
183 | iounmap(whc->base); | 183 | iounmap(whc->base); |
184 | if (whc->base_phys) | 184 | if (whc->base_phys) |