Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4843289e authored by Linus Walleij's avatar Linus Walleij
Browse files

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: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1dbf7f29
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment