From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: linux-kernel@vger.kernel.org
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Fabio Estevam <festevam@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
NXP Linux Team <linux-imx@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shawn Guo <shawnguo@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org
Subject: [PATCH] gpio: mxs: use dynamic allocation of base
Date: Sun, 26 Feb 2023 21:53:57 +0100 [thread overview]
Message-ID: <20230226205357.1013504-1-dario.binacchi@amarulasolutions.com> (raw)
Since commit 502df79b860563d7 ("gpiolib: Warn on drivers still using static
gpiobase allocation"), one or more warnings are printed during boot on
systems where static allocation of GPIO base is used:
[ 0.136834] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.142753] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.148452] gpio gpiochip2: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.154341] gpio gpiochip3: Static allocation of GPIO base is deprecated, use dynamic allocation.
[ 0.160097] gpio gpiochip4: Static allocation of GPIO base is deprecated, use dynamic allocation.
So let's follow the suggestion and use dynamic allocation.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/gpio/gpio-mxs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 7f59e5d936c2..b48a7c1fb7c1 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -330,7 +330,7 @@ static int mxs_gpio_probe(struct platform_device *pdev)
port->gc.to_irq = mxs_gpio_to_irq;
port->gc.get_direction = mxs_gpio_get_direction;
- port->gc.base = port->id * 32;
+ port->gc.base = -1;
err = gpiochip_add_data(&port->gc, port);
if (err)
--
2.32.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2023-02-26 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-26 20:53 Dario Binacchi [this message]
2023-02-27 17:52 ` [PATCH] gpio: mxs: use dynamic allocation of base Stefan Wahren
2023-02-28 7:50 ` Dario Binacchi
2023-02-28 8:46 ` Marco Felsch
2023-02-28 9:06 ` Alexander Stein
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=20230226205357.1013504-1-dario.binacchi@amarulasolutions.com \
--to=dario.binacchi@amarulasolutions.com \
--cc=brgl@bgdev.pl \
--cc=festevam@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@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