diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-07-22 10:07:46 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-08-05 11:43:20 +0200 |
commit | fe2afa0d7b5ce05f8d2c4508e4041f3a216a5539 (patch) | |
tree | 9a6dc23035b37698b4e73d0396f1287ffe777ff9 /drivers/gpio/gpio-madera.c | |
parent | 72ce665f170ee22069726840cd13ccf5af4ef34d (diff) |
gpio: 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/20190722090748.20807-2-ckeepax@opensource.cirrus.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-madera.c')
-rw-r--r-- | drivers/gpio/gpio-madera.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-madera.c b/drivers/gpio/gpio-madera.c index 4dbc837d1215..fa3441df0a5d 100644 --- a/drivers/gpio/gpio-madera.c +++ b/drivers/gpio/gpio-madera.c @@ -120,7 +120,7 @@ static const struct gpio_chip madera_gpio_chip = { static int madera_gpio_probe(struct platform_device *pdev) { struct madera *madera = dev_get_drvdata(pdev->dev.parent); - struct madera_pdata *pdata = dev_get_platdata(madera->dev); + struct madera_pdata *pdata = &madera->pdata; struct madera_gpio *madera_gpio; int ret; @@ -153,7 +153,7 @@ static int madera_gpio_probe(struct platform_device *pdev) } /* We want to be usable on systems that don't use devicetree or acpi */ - if (pdata && pdata->gpio_base) + if (pdata->gpio_base) madera_gpio->gpio_chip.base = pdata->gpio_base; else madera_gpio->gpio_chip.base = -1; |