diff options
Diffstat (limited to 'drivers/gpio/gpio-u300.c')
-rw-r--r-- | drivers/gpio/gpio-u300.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpio/gpio-u300.c b/drivers/gpio/gpio-u300.c index d92790140fe5..1a86fefd0f83 100644 --- a/drivers/gpio/gpio-u300.c +++ b/drivers/gpio/gpio-u300.c | |||
@@ -581,8 +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, memres->end - memres->start, "GPIO Controller") | 584 | if (!request_mem_region(memres->start, resource_size(memres), |
585 | == NULL) { | 585 | "GPIO Controller")) { |
586 | err = -ENODEV; | 586 | err = -ENODEV; |
587 | goto err_no_ioregion; | 587 | goto err_no_ioregion; |
588 | } | 588 | } |
@@ -640,7 +640,7 @@ static int __init gpio_probe(struct platform_device *pdev) | |||
640 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); | 640 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); |
641 | iounmap(virtbase); | 641 | iounmap(virtbase); |
642 | err_no_ioremap: | 642 | err_no_ioremap: |
643 | release_mem_region(memres->start, memres->end - memres->start); | 643 | release_mem_region(memres->start, resource_size(memres)); |
644 | err_no_ioregion: | 644 | err_no_ioregion: |
645 | err_no_resource: | 645 | err_no_resource: |
646 | clk_disable(clk); | 646 | clk_disable(clk); |
@@ -660,7 +660,7 @@ static int __exit gpio_remove(struct platform_device *pdev) | |||
660 | for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) | 660 | for (i = 0 ; i < U300_GPIO_NUM_PORTS; i++) |
661 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); | 661 | free_irq(gpio_ports[i].irq, &gpio_ports[i]); |
662 | iounmap(virtbase); | 662 | iounmap(virtbase); |
663 | release_mem_region(memres->start, memres->end - memres->start); | 663 | release_mem_region(memres->start, resource_size(memres)); |
664 | clk_disable(clk); | 664 | clk_disable(clk); |
665 | clk_put(clk); | 665 | clk_put(clk); |
666 | return 0; | 666 | return 0; |