gpio-pch: Set parent dev for gpio chip
authorAlexander Stein <alexander.stein@systec-electronic.com>
Fri, 2 Nov 2012 15:02:25 +0000 (16:02 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 4 Nov 2012 18:21:29 +0000 (19:21 +0100)
This will show the gpio chip as a child node
under /sys/bus/pci/devices/xxxx:xx:xx.x/

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pch.c

index 4ad0c4f9171c18f4c7baa2cf1f253b1ea08af495..e3a14fef79e16674f550f69d5be7822115085ce9 100644 (file)
@@ -215,6 +215,7 @@ static void pch_gpio_setup(struct pch_gpio *chip)
        struct gpio_chip *gpio = &chip->gpio;
 
        gpio->label = dev_name(chip->dev);
+       gpio->dev = chip->dev;
        gpio->owner = THIS_MODULE;
        gpio->direction_input = pch_gpio_direction_input;
        gpio->get = pch_gpio_get;