Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303291
b: refs/heads/master
c: 8d91771
h: refs/heads/master
i:
  303289: 35328d4
  303287: a684988
v: v3
  • Loading branch information
Linus Walleij committed Apr 24, 2012
1 parent 654a91f commit 189a3a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ebc6178dab43b38042f0e089526bad49081870e5
refs/heads/master: 8d91771ca4aff257f53ac7643f90b5cbb740971b
15 changes: 11 additions & 4 deletions trunk/drivers/gpio/gpio-nomadik.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

#include <plat/pincfg.h>
#include <plat/gpio-nomadik.h>
#include <mach/hardware.h>
#include <asm/gpio.h>

/*
* The GPIO module in the Nomadik family of Systems-on-Chip is an
Expand Down Expand Up @@ -1139,6 +1137,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
struct resource *res;
struct clk *clk;
int secondary_irq;
void __iomem *base;
int irq;
int ret;

Expand Down Expand Up @@ -1169,10 +1168,16 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
goto out;
}

base = ioremap(res->start, resource_size(res));
if (!base) {
ret = -ENOMEM;
goto out_release;
}

clk = clk_get(&dev->dev, NULL);
if (IS_ERR(clk)) {
ret = PTR_ERR(clk);
goto out_release;
goto out_unmap;
}

nmk_chip = kzalloc(sizeof(*nmk_chip), GFP_KERNEL);
Expand All @@ -1186,7 +1191,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
*/
nmk_chip->bank = dev->id;
nmk_chip->clk = clk;
nmk_chip->addr = io_p2v(res->start);
nmk_chip->addr = base;
nmk_chip->chip = nmk_gpio_template;
nmk_chip->parent_irq = irq;
nmk_chip->secondary_parent_irq = secondary_irq;
Expand Down Expand Up @@ -1226,6 +1231,8 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev)
out_clk:
clk_disable(clk);
clk_put(clk);
out_unmap:
iounmap(base);
out_release:
release_mem_region(res->start, resource_size(res));
out:
Expand Down

0 comments on commit 189a3a0

Please sign in to comment.