diff options
author | 2016-09-06 00:52:16 +0200 | |
---|---|---|
committer | 2016-09-25 02:38:56 -0500 | |
commit | 5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f (patch) | |
tree | 311a5cea4bc53318024961df3f3fbbb33e415fc9 /drivers | |
parent | powerpc/8xx: add dedicated machine check handler (diff) | |
download | linux-5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f.tar.gz linux-5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f.tar.bz2 linux-5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f.zip |
soc/fsl/qe: fix gpio save_regs functions
of_mm_gpiochip_add_data() calls mm_gc->save_regs() before
setting the data. Therefore ->save_regs() cannot use
gpiochip_get_data()
An Oops is encountered without this fix.
fixes: 1e714e54b5ca5 ("powerpc: qe_lib-gpio: use gpiochip data pointer")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: <stable@vger.kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/fsl/qe/gpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qe/gpio.c b/drivers/soc/fsl/qe/gpio.c index 333eb2215a57..0aaf429f31d5 100644 --- a/drivers/soc/fsl/qe/gpio.c +++ b/drivers/soc/fsl/qe/gpio.c @@ -41,7 +41,8 @@ struct qe_gpio_chip { static void qe_gpio_save_regs(struct of_mm_gpio_chip *mm_gc) { - struct qe_gpio_chip *qe_gc = gpiochip_get_data(&mm_gc->gc); + struct qe_gpio_chip *qe_gc = + container_of(mm_gc, struct qe_gpio_chip, mm_gc); struct qe_pio_regs __iomem *regs = mm_gc->regs; qe_gc->cpdata = in_be32(®s->cpdata); |