diff options
author | Marek Vasut <[email protected]> | 2015-06-30 20:04:18 +0200 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2015-07-16 13:42:46 +0200 |
commit | 34ab54edbef902f31842b428dce9530f3283847c (patch) | |
tree | dcbd398e4baea67b365a06628cf3e62d02c78946 | |
parent | 5b2c9121ef7cf9745f0c1df10544fd0ba6a6a38c (diff) |
gpio: max732x: Add missing dev reference to gpiochip
In case the gpiochip doesn't have the .dev field set, as is the case
in here, it is not possible to reference this device in DT as a GPIO
controller. A good example of this problem is that gpio-leds can not
be used when connected to this chip, the gpio-leds driver bails out
with -EPROBE_DEFER.
Fix this problem by setting the .dev field of the gpio_chip to the
parent i2c device.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Alexandre Courbot <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Mans Rullgard <[email protected]>
Cc: Olaf Mandel <[email protected]>
Cc: Semen Protsenko <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r-- | drivers/gpio/gpio-max732x.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c index aed4ca9338bc..7d3c90e9da71 100644 --- a/drivers/gpio/gpio-max732x.c +++ b/drivers/gpio/gpio-max732x.c @@ -603,6 +603,7 @@ static int max732x_setup_gpio(struct max732x_chip *chip, gc->base = gpio_start; gc->ngpio = port; gc->label = chip->client->name; + gc->dev = &chip->client->dev; gc->owner = THIS_MODULE; return port; |