Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72ce665f authored by Charles Keepax's avatar Charles Keepax Committed by Linus Walleij
Browse files

gpio: arizona: 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-1-ckeepax@opensource.cirrus.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d111e7a3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ static const struct gpio_chip template_chip = {
static int arizona_gpio_probe(struct platform_device *pdev)
{
	struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
	struct arizona_pdata *pdata = dev_get_platdata(arizona->dev);
	struct arizona_pdata *pdata = &arizona->pdata;
	struct arizona_gpio *arizona_gpio;
	int ret;

@@ -177,7 +177,7 @@ static int arizona_gpio_probe(struct platform_device *pdev)
		return -EINVAL;
	}

	if (pdata && pdata->gpio_base)
	if (pdata->gpio_base)
		arizona_gpio->gpio_chip.base = pdata->gpio_base;
	else
		arizona_gpio->gpio_chip.base = -1;