Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: mc33880: use gpiochip data pointer

This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

+2 -2
+2 -2
drivers/gpio/gpio-mc33880.c
··· 71 71 72 72 static void mc33880_set(struct gpio_chip *chip, unsigned offset, int value) 73 73 { 74 - struct mc33880 *mc = container_of(chip, struct mc33880, chip); 74 + struct mc33880 *mc = gpiochip_get_data(chip); 75 75 76 76 mutex_lock(&mc->lock); 77 77 ··· 135 135 goto exit_destroy; 136 136 } 137 137 138 - ret = gpiochip_add(&mc->chip); 138 + ret = gpiochip_add_data(&mc->chip, mc); 139 139 if (ret) 140 140 goto exit_destroy; 141 141