diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2009-11-23 19:27:22 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-23 19:27:22 +0100 |
commit | 4b7c7237c0826417059d2e60ffe6ed43202dc087 (patch) | |
tree | 2b405def369da286389bff5aefe2cf872cd1a4ae /drivers/ide/au1xxx-ide.c | |
parent | hpt366: remove dead old timing tables (diff) | |
download | linux-4b7c7237c0826417059d2e60ffe6ed43202dc087.tar.xz linux-4b7c7237c0826417059d2e60ffe6ed43202dc087.zip |
drivers/ide/au1xxx-ide.c: use resource_size()
Use resource_size() for {request/release}_mem_region and ioremap.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide/au1xxx-ide.c')
-rw-r--r-- | drivers/ide/au1xxx-ide.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/au1xxx-ide.c b/drivers/ide/au1xxx-ide.c index 58121bd6c115..87cef0c440ad 100644 --- a/drivers/ide/au1xxx-ide.c +++ b/drivers/ide/au1xxx-ide.c @@ -532,14 +532,13 @@ static int au_ide_probe(struct platform_device *dev) goto out; } - if (!request_mem_region(res->start, res->end - res->start + 1, - dev->name)) { + if (!request_mem_region(res->start, resource_size(res), dev->name)) { pr_debug("%s: request_mem_region failed\n", DRV_NAME); ret = -EBUSY; goto out; } - ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1); + ahwif->regbase = (u32)ioremap(res->start, resource_size(res)); if (ahwif->regbase == 0) { ret = -ENOMEM; goto out; @@ -575,7 +574,7 @@ static int au_ide_remove(struct platform_device *dev) iounmap((void *)ahwif->regbase); res = platform_get_resource(dev, IORESOURCE_MEM, 0); - release_mem_region(res->start, res->end - res->start + 1); + release_mem_region(res->start, resource_size(res)); return 0; } |