--- zzzz-none-000/linux-4.4.271/drivers/pinctrl/pinctrl-xway.c 2021-06-03 06:22:09.000000000 +0000 +++ dakota-7530ac-750/linux-4.4.271/drivers/pinctrl/pinctrl-xway.c 2023-01-11 09:25:42.000000000 +0000 @@ -648,7 +648,7 @@ /* --------- gpio_chip related code --------- */ static void xway_gpio_set(struct gpio_chip *chip, unsigned int pin, int val) { - struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev); + struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); if (val) gpio_setbit(info->membase[0], GPIO_OUT(pin), PORT_PIN(pin)); @@ -658,14 +658,14 @@ static int xway_gpio_get(struct gpio_chip *chip, unsigned int pin) { - struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev); + struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); return gpio_getbit(info->membase[0], GPIO_IN(pin), PORT_PIN(pin)); } static int xway_gpio_dir_in(struct gpio_chip *chip, unsigned int pin) { - struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev); + struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); gpio_clearbit(info->membase[0], GPIO_DIR(pin), PORT_PIN(pin)); @@ -674,7 +674,7 @@ static int xway_gpio_dir_out(struct gpio_chip *chip, unsigned int pin, int val) { - struct ltq_pinmux_info *info = dev_get_drvdata(chip->dev); + struct ltq_pinmux_info *info = dev_get_drvdata(chip->parent); gpio_setbit(info->membase[0], GPIO_DIR(pin), PORT_PIN(pin)); xway_gpio_set(chip, pin, val); @@ -783,7 +783,7 @@ xway_pctrl_desc.pins = xway_info.pads; /* load the gpio chip */ - xway_chip.dev = &pdev->dev; + xway_chip.parent = &pdev->dev; ret = gpiochip_add(&xway_chip); if (ret) { dev_err(&pdev->dev, "Failed to register gpio chip\n");