From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <bgolaszewski@baylibre.com>
Cc: <linus.walleij@linaro.org>, <linux-gpio@vger.kernel.org>,
<patches@opensource.cirrus.com>
Subject: [PATCH 2/4] gpio: madera: Use local copy of pdata
Date: Mon, 22 Jul 2019 10:07:46 +0100 [thread overview]
Message-ID: <20190722090748.20807-2-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20190722090748.20807-1-ckeepax@opensource.cirrus.com>
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>
---
drivers/gpio/gpio-madera.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-madera.c b/drivers/gpio/gpio-madera.c
index 4dbc837d12155..fa3441df0a5db 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;
--
2.11.0
next prev parent reply other threads:[~2019-07-22 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-22 9:07 [PATCH 1/4] gpio: arizona: Use local copy of pdata Charles Keepax
2019-07-22 9:07 ` Charles Keepax [this message]
2019-08-05 9:43 ` [PATCH 2/4] gpio: madera: " Linus Walleij
2019-07-22 9:07 ` [PATCH 3/4] gpio: madera: Add support for Cirrus Logic CS47L15 Charles Keepax
2019-08-05 9:45 ` Linus Walleij
2019-07-22 9:07 ` [PATCH 4/4] gpio: madera: Add support for Cirrus Logic CS47L92 Charles Keepax
2019-08-05 9:45 ` Linus Walleij
2019-08-05 9:42 ` [PATCH 1/4] gpio: arizona: Use local copy of pdata Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190722090748.20807-2-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=bgolaszewski@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).