--- zzzz-none-000/linux-4.4.271/drivers/gpio/gpio-twl6040.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/drivers/gpio/gpio-twl6040.c 2023-01-11 09:25:41.000000000 +0000 @@ -36,7 +36,7 @@ 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 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,7 +95,7 @@ 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