aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-zynq.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-08-27 14:13:46 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-10-02 04:19:32 -0700
commit2f930643c581f3fe45568f24a8aba93af46ff287 (patch)
tree8a10413474e997199675b039a0ba92d82495b0bd /drivers/gpio/gpio-zynq.c
parent218f1f8b50aef5438fd95a4e3d64549bf9c459c3 (diff)
gpio: vf610: use container_of() to get state container
The state container of the vf610 GPIO driver is sometimes extracted from the gpio_chip exploiting the fact that offsetof() the struct gpio_chip inside the struct vf610_gpio_port is 0, so the container_of() is in practice a noop. However if a member is added to struct vf610_gpio_port in front of struct gpio_chip, things will break. Using proper container_of() avoids this problem. Semantically this is a noop, the compiler will optimize it away, but syntactically it makes me happier. Also replace some explicit container_of() calls with the helper function. Acked-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-zynq.c')
0 files changed, 0 insertions, 0 deletions