diff options
author | Jiri Kosina <jkosina@suse.cz> | 2011-05-06 11:43:33 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-05-06 11:43:33 +0200 |
commit | 3d1c89b49119820a60c03e718108c553ce9e6b22 (patch) | |
tree | 6f23593da7f6692583fd42a1da5cb1ff02c19a9b /arch | |
parent | audit: acquire creds selectively to reduce atomic op overhead (diff) | |
download | linux-3d1c89b49119820a60c03e718108c553ce9e6b22.tar.xz linux-3d1c89b49119820a60c03e718108c553ce9e6b22.zip |
Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
This reverts commit b0c3af5ef0d7b38eb1ba522becd47123ac9736d2.
The driver has been rewritten in ARM tree.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-u300/gpio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c index 94837a4e146b..d92790140fe5 100644 --- a/arch/arm/mach-u300/gpio.c +++ b/arch/arm/mach-u300/gpio.c @@ -581,7 +581,8 @@ static int __init gpio_probe(struct platform_device *pdev) if (!memres) goto err_no_resource; - if (!request_mem_region(memres->start, resource_size(memres), "GPIO Controller")) { + if (request_mem_region(memres->start, memres->end - memres->start, "GPIO Controller") + == NULL) { err = -ENODEV; goto err_no_ioregion; } @@ -639,7 +640,7 @@ static int __init gpio_probe(struct platform_device *pdev) free_irq(gpio_ports[i].irq, &gpio_ports[i]); iounmap(virtbase); err_no_ioremap: - release_mem_region(memres->start, resource_size(memres)); + release_mem_region(memres->start, memres->end - memres->start); err_no_ioregion: err_no_resource: clk_disable(clk); @@ -659,7 +660,7 @@ static int __exit gpio_remove(struct platform_device *pdev) for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) free_irq(gpio_ports[i].irq, &gpio_ports[i]); iounmap(virtbase); - release_mem_region(memres->start, resource_size(memres)); + release_mem_region(memres->start, memres->end - memres->start); clk_disable(clk); clk_put(clk); return 0; |