From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
Linus Walleij <linus.walleij@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: [PATCH v1 1/1] pinctrl: st: Avoid using of_node member of struct gpio_chip
Date: Tue, 4 Oct 2022 15:54:49 +0300 [thread overview]
Message-ID: <20221004125449.67679-1-andriy.shevchenko@linux.intel.com> (raw)
The of_node member of the struct gpio_chip is obsoleted and
shouldn't be used. It will be removed in the future.
Replace its use in st_pctl_dt_calculate_pin() by comparing
the fwnode pointers.
Fixes: e75729b2f63f ("pinctrl: st: stop abusing of_get_named_gpio()")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/pinctrl-st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index cf7f9cbe6044..ac24d07338a4 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -1175,7 +1175,7 @@ static int st_pctl_dt_calculate_pin(struct st_pinctrl *info,
for (i = 0; i < info->nbanks; i++) {
chip = &info->banks[i].gpio_chip;
- if (chip->of_node == np) {
+ if (chip->fwnode == of_fwnode_handle(np)) {
if (offset < chip->ngpio)
retval = chip->base + offset;
break;
--
2.35.1
next reply other threads:[~2022-10-04 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 12:54 Andy Shevchenko [this message]
2022-10-10 6:13 ` [PATCH v1 1/1] pinctrl: st: Avoid using of_node member of struct gpio_chip Dmitry Torokhov
2022-10-10 6:47 ` Andy Shevchenko
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=20221004125449.67679-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrice.chotard@foss.st.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).