diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2019-07-22 10:07:45 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-08-05 11:42:29 +0200 |
commit | 72ce665f170ee22069726840cd13ccf5af4ef34d (patch) | |
tree | fc444074e8f35b597ea8618dda200f50d0587b3a /drivers/gpio/gpio-arizona.c | |
parent | d111e7a387d71b444b9a785d754f348d9a623204 (diff) | |
download | linux-72ce665f170ee22069726840cd13ccf5af4ef34d.tar.gz linux-72ce665f170ee22069726840cd13ccf5af4ef34d.tar.bz2 linux-72ce665f170ee22069726840cd13ccf5af4ef34d.zip |
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: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20190722090748.20807-1-ckeepax@opensource.cirrus.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-arizona.c')
-rw-r--r-- | drivers/gpio/gpio-arizona.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c index c07fad975049..5640efe5e750 100644 --- a/drivers/gpio/gpio-arizona.c +++ b/drivers/gpio/gpio-arizona.c @@ -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; |