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

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: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190722090748.20807-2-ckeepax@opensource.cirrus.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 72ce665f
......@@ -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;
......
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