diff options
author | Guenter Roeck <linux@roeck-us.net> | 2016-01-07 08:25:24 -0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-01-13 10:22:23 +0100 |
commit | 78179989a06636d8362e2eee01b261d02b1500d2 (patch) | |
tree | b87d723e5bf723ca42e45fcb2a7be752464b06e9 /drivers/gpio/gpio-mpc8xxx.c | |
parent | 95c761705ef5c2f094c56c4b779e74958246f2aa (diff) | |
download | linux-78179989a06636d8362e2eee01b261d02b1500d2.tar.gz linux-78179989a06636d8362e2eee01b261d02b1500d2.tar.bz2 linux-78179989a06636d8362e2eee01b261d02b1500d2.zip |
gpio: mpc8xxx: Do not use gpiochip_get_data() in mpc8xxx_gpio_save_regs()
Commit 709d71a17c33 ("gpio: mpc8xxx: use gpiochip data pointer") replaces
the use of container_of() with gpiochip_get_data(). However, the data
pointer is not yet set by the time the save_regs function is called.
Fixes: 709d71a17c33 ("gpio: mpc8xxx: use gpiochip data pointer")
Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mpc8xxx.c')
-rw-r--r-- | drivers/gpio/gpio-mpc8xxx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index 21eff0e1df87..9d40787e66c0 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -51,7 +51,8 @@ static inline u32 mpc8xxx_gpio2mask(unsigned int gpio) static void mpc8xxx_gpio_save_regs(struct of_mm_gpio_chip *mm) { - struct mpc8xxx_gpio_chip *mpc8xxx_gc = gpiochip_get_data(&mm->gc); + struct mpc8xxx_gpio_chip *mpc8xxx_gc = + container_of(mm, struct mpc8xxx_gpio_chip, mm_gc); mpc8xxx_gc->data = in_be32(mm->regs + GPIO_DAT); } |