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-timberdale.c | |
parent | d4e493caf788ef44982e131ff9c786546904d934 (diff) |
Linux-libre 4.5-gnu
Diffstat (limited to 'drivers/gpio/gpio-timberdale.c')
-rw-r--r-- | drivers/gpio/gpio-timberdale.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index 30653e631..a6de10c52 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -53,7 +53,7 @@ struct timbgpio { static int timbgpio_update_bit(struct gpio_chip *gpio, unsigned index, unsigned offset, bool enabled) { - struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio); + struct timbgpio *tgpio = gpiochip_get_data(gpio); u32 reg; spin_lock(&tgpio->lock); @@ -77,7 +77,7 @@ static int timbgpio_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) static int timbgpio_gpio_get(struct gpio_chip *gpio, unsigned nr) { - struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio); + struct timbgpio *tgpio = gpiochip_get_data(gpio); u32 value; value = ioread32(tgpio->membase + TGPIOVAL); @@ -98,7 +98,7 @@ static void timbgpio_gpio_set(struct gpio_chip *gpio, static int timbgpio_to_irq(struct gpio_chip *gpio, unsigned offset) { - struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio); + struct timbgpio *tgpio = gpiochip_get_data(gpio); if (tgpio->irq_base <= 0) return -EINVAL; @@ -268,7 +268,7 @@ static int timbgpio_probe(struct platform_device *pdev) gc->label = dev_name(&pdev->dev); gc->owner = THIS_MODULE; - gc->dev = &pdev->dev; + gc->parent = &pdev->dev; gc->direction_input = timbgpio_gpio_direction_input; gc->get = timbgpio_gpio_get; gc->direction_output = timbgpio_gpio_direction_output; @@ -279,7 +279,7 @@ static int timbgpio_probe(struct platform_device *pdev) gc->ngpio = pdata->nr_pins; gc->can_sleep = false; - err = gpiochip_add(gc); + err = gpiochip_add_data(gc, tgpio); if (err) return err; |