pinctrl: sirf: initialize the irq_chip pointer of pinctrl_gpio_range
authorBarry Song <Baohua.Song@csr.com>
Thu, 27 Sep 2012 09:55:46 +0000 (17:55 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Sep 2012 07:27:36 +0000 (09:27 +0200)
This patch initializes the optional irq_chip pointer gc in sirfsoc
pinctrl_gpio_range.

Signed-off-by: Baohua Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-sirf.c

index 0f4f833..8bf781e 100644 (file)
@@ -1210,8 +1210,10 @@ static int __devinit sirfsoc_pinmux_probe(struct platform_device *pdev)
                goto out_no_pmx;
        }
 
-       for (i = 0; i < ARRAY_SIZE(sirfsoc_gpio_ranges); i++)
+       for (i = 0; i < ARRAY_SIZE(sirfsoc_gpio_ranges); i++) {
+               sirfsoc_gpio_ranges[i].gc = &sgpio_bank[i].chip.gc;
                pinctrl_add_gpio_range(spmx->pmx, &sirfsoc_gpio_ranges[i]);
+       }
 
        dev_info(&pdev->dev, "initialized SIRFSOC pinmux driver\n");