diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-08-25 10:40:23 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-02 04:19:31 -0700 |
commit | 4843289e60e16bed00b7c3b910e67fb06214631a (patch) | |
tree | 69c8ae548914fbd63aab12befa324bda7b06b3a1 /drivers/gpio/gpio-cs5535.c | |
parent | 1dbf7f299f90dc4b45e2322a3af843ad65e1501b (diff) |
gpio: etraxfs: use container_of() to get state container
The state container of the etraxfs GPIO driver is extracted from
the gpio_chip exploiting the fact that offsetof() the
struct gpio_chip inside the struct bgpio_chip are both 0, so
the container_of() is in practice a noop. However if a member
is added to struct etraxfs_gpio_chip in front of
struct bgpio_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.
Acked-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-cs5535.c')
0 files changed, 0 insertions, 0 deletions