linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] pinctrl: madera: Use local copy of pdata
@ 2019-07-22  9:10 Charles Keepax
  2019-07-22  9:10 ` [PATCH 2/3] pinctrl: madera: Add configuration for Cirrus Logic CS47L15 Charles Keepax
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Charles Keepax @ 2019-07-22  9:10 UTC (permalink / raw)
  To: linus.walleij; +Cc: linux-gpio, patches

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/pinctrl/cirrus/pinctrl-madera-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/cirrus/pinctrl-madera-core.c b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
index c6b9f65f23621..0c7fa1febc802 100644
--- a/drivers/pinctrl/cirrus/pinctrl-madera-core.c
+++ b/drivers/pinctrl/cirrus/pinctrl-madera-core.c
@@ -986,7 +986,7 @@ static struct pinctrl_desc madera_pin_desc = {
 static int madera_pin_probe(struct platform_device *pdev)
 {
 	struct madera *madera = dev_get_drvdata(pdev->dev.parent);
-	const struct madera_pdata *pdata = dev_get_platdata(madera->dev);
+	const struct madera_pdata *pdata = &madera->pdata;
 	struct madera_pin_private *priv;
 	int ret;
 
@@ -1037,7 +1037,7 @@ static int madera_pin_probe(struct platform_device *pdev)
 	}
 
 	/* if the configuration is provided through pdata, apply it */
-	if (pdata && pdata->gpio_configs) {
+	if (pdata->gpio_configs) {
 		ret = pinctrl_register_mappings(pdata->gpio_configs,
 						pdata->n_gpio_configs);
 		if (ret) {
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-08-05  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22  9:10 [PATCH 1/3] pinctrl: madera: Use local copy of pdata Charles Keepax
2019-07-22  9:10 ` [PATCH 2/3] pinctrl: madera: Add configuration for Cirrus Logic CS47L15 Charles Keepax
2019-08-05  9:47   ` Linus Walleij
2019-07-22  9:10 ` [PATCH 3/3] pinctrl: madera: Add configuration for Cirrus Logic CS47L92 Charles Keepax
2019-08-05  9:48   ` Linus Walleij
2019-08-05  9:46 ` [PATCH 1/3] pinctrl: madera: Use local copy of pdata Linus Walleij

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).