gpio: em: Setup gpiochip->dev
authorMagnus Damm <damm@opensource.se>
Wed, 20 Nov 2013 00:23:26 +0000 (09:23 +0900)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 25 Nov 2013 08:03:39 +0000 (09:03 +0100)
Make sure gpio_chip->dev is setup so of_gpiochip_add()
will work as expected.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-em.c

index ec190361bf2e551352a265fd2bcb576e71bd06f1..b1decec9b359ba994d791f326d1f8d90f4c53c91 100644 (file)
@@ -328,6 +328,7 @@ static int em_gio_probe(struct platform_device *pdev)
        gpio_chip->request = em_gio_request;
        gpio_chip->free = em_gio_free;
        gpio_chip->label = name;
+       gpio_chip->dev = &pdev->dev;
        gpio_chip->owner = THIS_MODULE;
        gpio_chip->base = pdata->gpio_base;
        gpio_chip->ngpio = pdata->number_of_pins;