diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2015-12-07 10:04:32 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-01-05 11:21:07 +0100 |
commit | 609f9692ccd7034aaf620a6cd4ec1b6fb9ba4c7b (patch) | |
tree | 0f9b8027be5112d10d5d61e61c1bdd21a0d4e568 /drivers/gpio/gpio-mc33880.c | |
parent | 01f76b267bdfaae5ead2fff5de7c80c81ffff1b4 (diff) | |
download | linux-stable-609f9692ccd7034aaf620a6cd4ec1b6fb9ba4c7b.tar.gz linux-stable-609f9692ccd7034aaf620a6cd4ec1b6fb9ba4c7b.tar.bz2 linux-stable-609f9692ccd7034aaf620a6cd4ec1b6fb9ba4c7b.zip |
gpio: mc33880: use gpiochip data pointer
This makes the driver use the data pointer added to the gpio_chip
to store a pointer to the state container instead of relying on
container_of().
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mc33880.c')
-rw-r--r-- | drivers/gpio/gpio-mc33880.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mc33880.c b/drivers/gpio/gpio-mc33880.c index b46b9e522e8c..0f0df7956264 100644 --- a/drivers/gpio/gpio-mc33880.c +++ b/drivers/gpio/gpio-mc33880.c @@ -71,7 +71,7 @@ static int __mc33880_set(struct mc33880 *mc, unsigned offset, int value) static void mc33880_set(struct gpio_chip *chip, unsigned offset, int value) { - struct mc33880 *mc = container_of(chip, struct mc33880, chip); + struct mc33880 *mc = gpiochip_get_data(chip); mutex_lock(&mc->lock); @@ -135,7 +135,7 @@ static int mc33880_probe(struct spi_device *spi) goto exit_destroy; } - ret = gpiochip_add(&mc->chip); + ret = gpiochip_add_data(&mc->chip, mc); if (ret) goto exit_destroy; |