summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-axp209.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/pinctrl-axp209.c')
-rw-r--r--drivers/pinctrl/pinctrl-axp209.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-axp209.c b/drivers/pinctrl/pinctrl-axp209.c
index 22d3bb0bf927..1231bbbfa744 100644
--- a/drivers/pinctrl/pinctrl-axp209.c
+++ b/drivers/pinctrl/pinctrl-axp209.c
@@ -413,9 +413,11 @@ static int axp20x_pctl_probe(struct platform_device *pdev)
pctl->chip.set = axp20x_gpio_set;
pctl->chip.direction_input = axp20x_gpio_input;
pctl->chip.direction_output = axp20x_gpio_output;
+
+ pctl->desc = of_device_get_match_data(dev);
+
pctl->chip.ngpio = pctl->desc->npins;
- pctl->desc = (struct axp20x_pctrl_desc *)of_device_get_match_data(dev);
pctl->regmap = axp20x->regmap;
pctl->dev = &pdev->dev;