diff options
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
-rw-r--r-- | drivers/gpio/gpio-mxc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 4db460b6ecf7..80f44bb64a87 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c | |||
@@ -465,9 +465,8 @@ static int __devinit mxc_gpio_probe(struct platform_device *pdev) | |||
465 | goto out_iounmap; | 465 | goto out_iounmap; |
466 | 466 | ||
467 | port->bgc.gc.to_irq = mxc_gpio_to_irq; | 467 | port->bgc.gc.to_irq = mxc_gpio_to_irq; |
468 | port->bgc.gc.base = pdev->id * 32; | 468 | port->bgc.gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 : |
469 | port->bgc.dir = port->bgc.read_reg(port->bgc.reg_dir); | 469 | pdev->id * 32; |
470 | port->bgc.data = port->bgc.read_reg(port->bgc.reg_set); | ||
471 | 470 | ||
472 | err = gpiochip_add(&port->bgc.gc); | 471 | err = gpiochip_add(&port->bgc.gc); |
473 | if (err) | 472 | if (err) |