diff options
Diffstat (limited to 'arch/arm')
-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) | |||
581 | if (!memres) | 581 | if (!memres) |
582 | goto err_no_resource; | 582 | goto err_no_resource; |
583 | 583 | ||
584 | if (!request_mem_region(memres->start, resource_size(memres), "GPIO Controller")) { | 584 | if (request_mem_region(memres->start, memres->end - memres->start, "GPIO Controller") |
585 | == NULL) { | ||
585 | err = -ENODEV; | 586 | err = -ENODEV; |
586 | goto err_no_ioregion; | 587 | goto err_no_ioregion; |
587 | } | 588 | } |
@@ -639,7 +640,7 @@ static int __init gpio_probe(struct platform_device *pdev) | |||
639 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); | 640 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); |
640 | iounmap(virtbase); | 641 | iounmap(virtbase); |
641 | err_no_ioremap: | 642 | err_no_ioremap: |
642 | release_mem_region(memres->start, resource_size(memres)); | 643 | release_mem_region(memres->start, memres->end - memres->start); |
643 | err_no_ioregion: | 644 | err_no_ioregion: |
644 | err_no_resource: | 645 | err_no_resource: |
645 | clk_disable(clk); | 646 | clk_disable(clk); |
@@ -659,7 +660,7 @@ static int __exit gpio_remove(struct platform_device *pdev) | |||
659 | for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) | 660 | for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) |
660 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); | 661 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); |
661 | iounmap(virtbase); | 662 | iounmap(virtbase); |
662 | release_mem_region(memres->start, resource_size(memres)); | 663 | release_mem_region(memres->start, memres->end - memres->start); |
663 | clk_disable(clk); | 664 | clk_disable(clk); |
664 | clk_put(clk); | 665 | clk_put(clk); |
665 | return 0; | 666 | return 0; |