summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-msm-v2.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-08-27 14:26:46 +0200
committerLinus Walleij <linus.walleij@linaro.org>2015-10-02 13:19:33 +0200
commitfa9795d1121e18a6ee2d0f8b2e837f51d63d4b00 (patch)
treea2a49fcdc5ff1502f4fe88a454df5d83e1c015e1 /drivers/gpio/gpio-msm-v2.c
parentgpio: vf610: use container_of() to get state container (diff)
downloadlinux-fa9795d1121e18a6ee2d0f8b2e837f51d63d4b00.tar.xz
linux-fa9795d1121e18a6ee2d0f8b2e837f51d63d4b00.zip
gpio: zynq: use container_of() to get state container
The state container of the Zynq GPIO driver is sometimes extracted from the gpio_chip exploiting the fact that offsetof() the struct gpio_chip inside the struct zynq_gpio is 0, so the container_of() is in practice a noop. However if a member is added to struct zynq_gpio 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. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Ezra Savard <ezra.savard@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Acked-by: Harini Katakam <harinik@xilinx.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-msm-v2.c')
0 files changed, 0 insertions, 0 deletions