summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/cirrus
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.cirrus.com>2019-07-22 12:10:13 +0300
committerLinus Walleij <linus.walleij@linaro.org>2019-08-05 12:46:25 +0300
commitf134b8517736bddc52955fef08e70bde7d408c0b (patch)
tree8a5d70578bdd27c69c0b0464453ec0eecf68a636 /drivers/pinctrl/cirrus
parente38a9a437fb93ddafab5030165e4c6a3a5021669 (diff)
downloadlinux-f134b8517736bddc52955fef08e70bde7d408c0b.tar.xz
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: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20190722091015.20884-1-ckeepax@opensource.cirrus.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/cirrus')
-rw-r--r--drivers/pinctrl/cirrus/pinctrl-madera-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/cirrus/pinctrl-madera-core.c b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
index c6b9f65f2362..0c7fa1febc80 100644
--- a/drivers/pinctrl/cirrus/pinctrl-madera-core.c
+++ b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
@@ -986,7 +986,7 @@ static struct pinctrl_desc madera_pin_desc = {
static int madera_pin_probe(struct platform_device *pdev)
{
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;
int ret;
@@ -1037,7 +1037,7 @@ static int madera_pin_probe(struct platform_device *pdev)
}
/* 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,
pdata->n_gpio_configs);
if (ret) {