aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Roeck <[email protected]>2016-01-07 08:24:58 -0800
committerLinus Walleij <[email protected]>2016-01-13 10:21:06 +0100
commit95c761705ef5c2f094c56c4b779e74958246f2aa (patch)
tree1d02374c3a09f22bcd99876502dbf6a9c872be32
parenta02588a0efd6008f70ab69318ebacd79cbd3dc6b (diff)
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. 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]> Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r--drivers/gpio/gpio-mm-lantiq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mm-lantiq.c b/drivers/gpio/gpio-mm-lantiq.c
index a2071ed69f79..54e5d8257d34 100644
--- a/drivers/gpio/gpio-mm-lantiq.c
+++ b/drivers/gpio/gpio-mm-lantiq.c
@@ -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);