summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-sx150x.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-08-25 08:54:12 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2015-10-02 11:19:32 (GMT)
commit231d51b8a4d5b24e72112bbc73fdcc38759a26e3 (patch)
treef01c6b7c3fb8b477475c4ed4d917ad7d9d754088 /drivers/gpio/gpio-sx150x.c
parent4843289e60e16bed00b7c3b910e67fb06214631a (diff)
downloadlinux-231d51b8a4d5b24e72112bbc73fdcc38759a26e3.tar.xz
gpio: altera: use container_of() to get state container
The state container of the Altera GPIO driver is extracted from the gpio_chip exploiting the fact that offsetof() the struct gpio_chip inside the struct of_mm_gpio_chip are both 0, so the container_of() is in practice a noop. However if a member is added to struct altera_gpio_chip in front of struct of_mm_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. Cc: Tien Hock Loh <thloh@altera.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-sx150x.c')
0 files changed, 0 insertions, 0 deletions