gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()
PATCH 1/1 gpio: mm-lantiq: Do not use gpiochip_get_data() in ltq_mm_save_regs()
Commit 6aa7dbfa2877 ("gpio: mm-lantiq: 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.
---
It might make sense to merge this patch into the patch causing the problem.
drivers/gpio/gpio-mm-lantiq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpio/gpio-mm-lantiq.c +2 -1
@@ -91,7 +91,8 @@ static int ltq_mm_dir_out(struct gpio_chip *gc, unsigned offset, int value)*/ static void ltq_mm_save_regs (struct of_mm_gpio_chip *mm_gc) { -struct ltq_mm *chip =gpiochip_get_data (&mm_gc->gc); +struct ltq_mm *chip = + container_of(mm_gc, struct ltq_mm, mmchip);/* tell the ebu controller which memory address we will be using */ ltq_ebu_w32 (CPHYSADDR (chip->mmchip.regs) |0x1 ,LTQ_EBU_ADDRSEL1 );
Signature · 1 line
2.1.4
Quoted 8 lines · Guenter Roeck
Commit
6aa7dbfa2877("gpio: mm-lantiq: use gpiochip data pointer") replaces the use ofcontainer_of()withgpiochip_get_data(). However, the data pointer is not yet set by the time thesave_regsfunction is called.Fixes 6aa7dbfa2877 ("gpio: mm-lantiq: use gpiochip data pointer")Cc Ricardo Ribalda Delgado <[email protected]>Cc John Crispin <[email protected]>Signed-off-by Guenter Roeck <[email protected]>
Patch applied.
Quoted 1 line
It might make sense to merge this patch into the patch causing the problem.
Nah, don't wanna rebase. Plus people should see all mistakes I make...
Yours,
Linus Walleij