9
0
Fork 0

ARM i.MX gpio: fix of gpio base

of_alias_get_id() returns the number of the gpio bank, so we have
to multiply with 32 to get the gpio base.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2012-10-05 22:43:31 +02:00
parent 52df7b6184
commit bad4d7cd75
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ static int imx_gpio_probe(struct device_d *dev)
imxgpio->chip.base = of_alias_get_id(dev->device_node, "gpio");
if (imxgpio->chip.base < 0)
return imxgpio->chip.base;
imxgpio->chip.base *= 32;
} else {
imxgpio->chip.base = dev->id * 32;
}