diff options
author | Thiago Farina <tfransosi@gmail.com> | 2010-01-02 00:42:34 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 01:54:01 +0300 |
commit | c38b94017c74061cabc342d3222387e0a5e8b6cd (patch) | |
tree | 3123c627e1f4d3f41c04efaf05ea67aeeaccc7c7 /drivers/usb | |
parent | 4585ef11d23aa9dbbf776b135ba70577df97587b (diff) | |
download | linux-c38b94017c74061cabc342d3222387e0a5e8b6cd.tar.xz |
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')
-rw-r--r-- | drivers/usb/c67x00/c67x00-drv.c | 8 |
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) if (!c67x00) return -ENOMEM; - if (!request_mem_region(res->start, res->end - res->start + 1, + if (!request_mem_region(res->start, resource_size(res), pdev->name)) { dev_err(&pdev->dev, "Memory region busy\n"); ret = -EBUSY; goto request_mem_failed; } - c67x00->hpi.base = ioremap(res->start, res->end - res->start + 1); + c67x00->hpi.base = ioremap(res->start, resource_size(res)); if (!c67x00->hpi.base) { dev_err(&pdev->dev, "Unable to map HPI registers\n"); ret = -EIO; @@ -182,7 +182,7 @@ static int __devinit c67x00_drv_probe(struct platform_device *pdev) request_irq_failed: iounmap(c67x00->hpi.base); map_failed: - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); request_mem_failed: kfree(c67x00); @@ -208,7 +208,7 @@ static int __devexit c67x00_drv_remove(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (res) - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); kfree(c67x00); |