Commit f134b851 authored by Charles Keepax's avatar Charles Keepax Committed by Linus Walleij

pinctrl: madera: Use local copy of pdata

A local copy of the pdata exists and it should be used rather than
pulling a fresh copy.
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190722091015.20884-1-ckeepax@opensource.cirrus.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e38a9a43
...@@ -986,7 +986,7 @@ static struct pinctrl_desc madera_pin_desc = { ...@@ -986,7 +986,7 @@ static struct pinctrl_desc madera_pin_desc = {
static int madera_pin_probe(struct platform_device *pdev) static int madera_pin_probe(struct platform_device *pdev)
{ {
struct madera *madera = dev_get_drvdata(pdev->dev.parent); struct madera *madera = dev_get_drvdata(pdev->dev.parent);
const struct madera_pdata *pdata = dev_get_platdata(madera->dev); const struct madera_pdata *pdata = &madera->pdata;
struct madera_pin_private *priv; struct madera_pin_private *priv;
int ret; int ret;
...@@ -1037,7 +1037,7 @@ static int madera_pin_probe(struct platform_device *pdev) ...@@ -1037,7 +1037,7 @@ static int madera_pin_probe(struct platform_device *pdev)
} }
/* if the configuration is provided through pdata, apply it */ /* if the configuration is provided through pdata, apply it */
if (pdata && pdata->gpio_configs) { if (pdata->gpio_configs) {
ret = pinctrl_register_mappings(pdata->gpio_configs, ret = pinctrl_register_mappings(pdata->gpio_configs,
pdata->n_gpio_configs); pdata->n_gpio_configs);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment