diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-xway.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-xway.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index ae724bdab3d3..b4380fb72001 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c @@ -648,7 +648,7 @@ static struct ltq_pinmux_info xway_info = { /* --------- 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 void xway_gpio_set(struct gpio_chip *chip, unsigned int pin, int val) 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_in(struct gpio_chip *chip, unsigned int pin) 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 @@ static int pinmux_xway_probe(struct platform_device *pdev) 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"); |