diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-25 03:53:42 -0300 |
commit | 03dd4cb26d967f9588437b0fc9cc0e8353322bb7 (patch) | |
tree | fa581f6dc1c0596391690d1f67eceef3af8246dc /drivers/gpio/gpio-max730x.c | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/gpio/gpio-max730x.c')
-rw-r--r-- | drivers/gpio/gpio-max730x.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c index 0f57d2d24..08807368f 100644 --- a/drivers/gpio/gpio-max730x.c +++ b/drivers/gpio/gpio-max730x.c @@ -50,7 +50,7 @@ static int max7301_direction_input(struct gpio_chip *chip, unsigned offset) { - struct max7301 *ts = container_of(chip, struct max7301, chip); + struct max7301 *ts = gpiochip_get_data(chip); u8 *config; u8 offset_bits, pin_config; int ret; @@ -92,7 +92,7 @@ static int __max7301_set(struct max7301 *ts, unsigned offset, int value) static int max7301_direction_output(struct gpio_chip *chip, unsigned offset, int value) { - struct max7301 *ts = container_of(chip, struct max7301, chip); + struct max7301 *ts = gpiochip_get_data(chip); u8 *config; u8 offset_bits; int ret; @@ -120,7 +120,7 @@ static int max7301_direction_output(struct gpio_chip *chip, unsigned offset, static int max7301_get(struct gpio_chip *chip, unsigned offset) { - struct max7301 *ts = container_of(chip, struct max7301, chip); + struct max7301 *ts = gpiochip_get_data(chip); int config, level = -EINVAL; /* First 4 pins are unused in the controller */ @@ -148,7 +148,7 @@ static int max7301_get(struct gpio_chip *chip, unsigned offset) static void max7301_set(struct gpio_chip *chip, unsigned offset, int value) { - struct max7301 *ts = container_of(chip, struct max7301, chip); + struct max7301 *ts = gpiochip_get_data(chip); /* First 4 pins are unused in the controller */ offset += 4; @@ -189,7 +189,7 @@ int __max730x_probe(struct max7301 *ts) ts->chip.ngpio = PIN_NUMBER; ts->chip.can_sleep = true; - ts->chip.dev = dev; + ts->chip.parent = dev; ts->chip.owner = THIS_MODULE; /* @@ -213,7 +213,7 @@ int __max730x_probe(struct max7301 *ts) } } - ret = gpiochip_add(&ts->chip); + ret = gpiochip_add_data(&ts->chip, ts); if (ret) goto exit_destroy; |