aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/c67x00
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2010-01-01 16:42:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:01 -0500
commitc38b94017c74061cabc342d3222387e0a5e8b6cd (patch)
tree3123c627e1f4d3f41c04efaf05ea67aeeaccc7c7 /drivers/usb/c67x00
parent4585ef11d23aa9dbbf776b135ba70577df97587b (diff)
USB: c67x00: use resource_size().
Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/c67x00')
-rw-r--r--drivers/usb/c67x00/c67x00-drv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/c67x00/c67x00-drv.c b/drivers/usb/c67x00/c67x00-drv.c
index 5633bc5c8bf2..029ee4a8a1f3 100644
--- a/drivers/usb/c67x00/c67x00-drv.c
+++ b/drivers/usb/c67x00/c67x00-drv.c
@@ -137,13 +137,13 @@ static int __devinit c67x00_drv_probe(struct platform_device *pdev)
137 if (!c67x00) 137 if (!c67x00)
138 return -ENOMEM; 138 return -ENOMEM;
139 139
140 if (!request_mem_region(res->start, res->end - res->start + 1, 140 if (!request_mem_region(res->start, resource_size(res),
141 pdev->name)) { 141 pdev->name)) {
142 dev_err(&pdev->dev, "Memory region busy\n"); 142 dev_err(&pdev->dev, "Memory region busy\n");
143 ret = -EBUSY; 143 ret = -EBUSY;
144 goto request_mem_failed; 144 goto request_mem_failed;
145 } 145 }
146 c67x00->hpi.base = ioremap(res->start, res->end - res->start + 1); 146 c67x00->hpi.base = ioremap(res->start, resource_size(res));
147 if (!c67x00->hpi.base) { 147 if (!c67x00->hpi.base) {
148 dev_err(&pdev->dev, "Unable to map HPI registers\n"); 148 dev_err(&pdev->dev, "Unable to map HPI registers\n");
149 ret = -EIO; 149 ret = -EIO;
@@ -182,7 +182,7 @@ static int __devinit c67x00_drv_probe(struct platform_device *pdev)
182 request_irq_failed: 182 request_irq_failed:
183 iounmap(c67x00->hpi.base); 183 iounmap(c67x00->hpi.base);
184 map_failed: 184 map_failed:
185 release_mem_region(res->start, res->end - res->start + 1); 185 release_mem_region(res->start, resource_size(res));
186 request_mem_failed: 186 request_mem_failed:
187 kfree(c67x00); 187 kfree(c67x00);
188 188
@@ -208,7 +208,7 @@ static int __devexit c67x00_drv_remove(struct platform_device *pdev)
208 208
209 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 209 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
210 if (res) 210 if (res)
211 release_mem_region(res->start, res->end - res->start + 1); 211 release_mem_region(res->start, resource_size(res));
212 212
213 kfree(c67x00); 213 kfree(c67x00);
214 214