From: Amitesh Singh Date: Fri, 16 Sep 2016 16:58:53 +0000 (+0530) Subject: gpio: f7188x: use gpiochip_get_data instead of container_of X-Git-Tag: v4.9-rc1~122^2~18 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=35a26144a193536eb8870de99ff4b7093b7879a3;p=karo-tx-linux.git gpio: f7188x: use gpiochip_get_data instead of container_of gpiochip_add_data is already used to add data pointer and chip. Lets rely on gpiochip_get_data which is getting used in other gpio_chip functions. Signed-off-by: Amitesh Singh Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-f7188x.c b/drivers/gpio/gpio-f7188x.c index 600be8418707..e8accde62aa7 100644 --- a/drivers/gpio/gpio-f7188x.c +++ b/drivers/gpio/gpio-f7188x.c @@ -214,8 +214,7 @@ static struct f7188x_gpio_bank f81866_gpio_bank[] = { static int f7188x_gpio_get_direction(struct gpio_chip *chip, unsigned offset) { int err; - struct f7188x_gpio_bank *bank = - container_of(chip, struct f7188x_gpio_bank, chip); + struct f7188x_gpio_bank *bank = gpiochip_get_data(chip); struct f7188x_sio *sio = bank->data->sio; u8 dir;