Skip to contentSkip to conversation

Patch "soc/fsl/qe: fix gpio save_regs functions" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Oct 26, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

soc/fsl/qe: fix gpio save_regs functions

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
soc-fsl-qe-fix-gpio-save_regs-functions.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f Mon Sep 17 00:00:00 2001

From: Christophe Leroy <[email protected]>
Date: Tue, 6 Sep 2016 00:52:16 +0200
Subject: soc/fsl/qe: fix gpio save_regs functions

From: Christophe Leroy <[email protected]>

commit 5dc6f3fedee58efa343e822558fc3e2f0eb2ad1f upstream.

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")
---
 drivers/soc/fsl/qe/gpio.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/soc/fsl/qe/gpio.c +2 -1
@@ -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(&regs->cpdata);

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/soc-fsl-qe-fix-oops-on-cpm1-and-likely-cpm2.patch queue-4.8/soc-fsl-qe-fix-gpio-save_regs-functions.patch