From: haibo.chen@nxp.com
To: linus.walleij@linaro.org, brgl@bgdev.pl
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-imx@nxp.com, haibo.chen@nxp.com,
christophe.leroy@csgroup.eu
Subject: [PATCH 2/2] gpio: mxc: switch to dynamic allocat GPIO base
Date: Sat, 6 May 2023 16:59:28 +0800 [thread overview]
Message-ID: <20230506085928.933737-2-haibo.chen@nxp.com> (raw)
In-Reply-To: <20230506085928.933737-1-haibo.chen@nxp.com>
From: Haibo Chen <haibo.chen@nxp.com>
gpiolib want to get completely rid of static gpiobase allocation,
so switch to dynamic allocat GPIO base, also can avoid warning
message:
[ 1.529974] gpio gpiochip0: Static allocation of GPIO base
is deprecated, use dynamic allocation.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
drivers/gpio/gpio-mxc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 9d0cec4b82a3..abc129a88a62 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -462,8 +462,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
port->gc.request = gpiochip_generic_request;
port->gc.free = gpiochip_generic_free;
port->gc.to_irq = mxc_gpio_to_irq;
- port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 :
- pdev->id * 32;
+ port->gc.base = -1;
err = devm_gpiochip_add_data(&pdev->dev, &port->gc, port);
if (err)
--
2.34.1
next prev parent reply other threads:[~2023-05-06 8:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 8:59 [PATCH 1/2] gpio: vf610: switch to dynamic allocat GPIO base haibo.chen
2023-05-06 8:59 ` haibo.chen [this message]
2023-05-06 13:06 ` [PATCH 2/2] gpio: mxc: " Linus Walleij
2023-08-21 2:47 ` Bough Chen
2023-08-21 7:25 ` Linus Walleij
2023-08-21 7:44 ` Alexander Stein
2023-08-21 10:21 ` Linus Walleij
2023-08-21 12:17 ` Bartosz Golaszewski
2023-08-28 13:56 ` Ahmad Fatoum
2023-05-26 13:12 ` Bartosz Golaszewski
2023-05-06 13:04 ` [PATCH 1/2] gpio: vf610: " Linus Walleij
2023-08-21 2:47 ` Bough Chen
2023-08-22 9:39 ` Bartosz Golaszewski
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=20230506085928.933737-2-haibo.chen@nxp.com \
--to=haibo.chen@nxp.com \
--cc=brgl@bgdev.pl \
--cc=christophe.leroy@csgroup.eu \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
/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).