summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-vf610.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-08-25 09:26:04 (GMT)
committerLinus Walleij <linus.walleij@linaro.org>2015-10-02 11:19:32 (GMT)
commit218f1f8b50aef5438fd95a4e3d64549bf9c459c3 (patch)
tree24b4a37d18af29863bdcca06a0808968fab78fd9 /drivers/gpio/gpio-vf610.c
parent231d51b8a4d5b24e72112bbc73fdcc38759a26e3 (diff)
downloadlinux-218f1f8b50aef5438fd95a4e3d64549bf9c459c3.tar.xz
gpio: sx150x: use container_of() to get state container
The state container of the sx150x GPIO driver is sometimes extracted from the gpio_chip exploiting the fact that offsetof() the struct gpio_chip inside the struct sx150x_chip is 0, so the container_of() is in practice a noop. However if a member is added to struct sx150_chip 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. Cc: Wei Chen <Wei.Chen@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-vf610.c')
0 files changed, 0 insertions, 0 deletions