Merge tag 'mmc-v4.5-rc1' of git://git.linaro.org/people/ulf.hansson/mmc
[linux-2.6-block.git] / drivers / gpio / gpio-twl6040.c
index c946e7eef3ee75f7c1d0e9cf183ee8f5e03999a6..8e9e9853f3bd4c9f92985a650dc07452bb0b72bd 100644 (file)
@@ -36,7 +36,7 @@ static struct gpio_chip twl6040gpo_chip;
 
 static int twl6040gpo_get(struct gpio_chip *chip, unsigned offset)
 {
-       struct twl6040 *twl6040 = dev_get_drvdata(chip->dev->parent);
+       struct twl6040 *twl6040 = dev_get_drvdata(chip->parent->parent);
        int ret = 0;
 
        ret = twl6040_reg_read(twl6040, TWL6040_REG_GPOCTL);
@@ -55,7 +55,7 @@ static int twl6040gpo_direction_out(struct gpio_chip *chip, unsigned offset,
 
 static void twl6040gpo_set(struct gpio_chip *chip, unsigned offset, int value)
 {
-       struct twl6040 *twl6040 = dev_get_drvdata(chip->dev->parent);
+       struct twl6040 *twl6040 = dev_get_drvdata(chip->parent->parent);
        int ret;
        u8 gpoctl;
 
@@ -95,12 +95,12 @@ static int gpo_twl6040_probe(struct platform_device *pdev)
        else
                twl6040gpo_chip.ngpio = 1; /* twl6041 have 1 GPO */
 
-       twl6040gpo_chip.dev = &pdev->dev;
+       twl6040gpo_chip.parent = &pdev->dev;
 #ifdef CONFIG_OF_GPIO
        twl6040gpo_chip.of_node = twl6040_core_dev->of_node;
 #endif
 
-       ret = gpiochip_add(&twl6040gpo_chip);
+       ret = gpiochip_add_data(&twl6040gpo_chip, NULL);
        if (ret < 0) {
                dev_err(&pdev->dev, "could not register gpiochip, %d\n", ret);
                twl6040gpo_chip.ngpio = 0;