linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] gpio: mxc: remove static allocation of GPIO base
@ 2023-02-14 22:46 Shenwei Wang
  2023-02-15  8:29 ` Bartosz Golaszewski
  0 siblings, 1 reply; 4+ messages in thread
From: Shenwei Wang @ 2023-02-14 22:46 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski; +Cc: linux-gpio, imx, Shenwei Wang

The latest gpio driver framework will give the following warning
when it detects the static allocation of the GPIO bases.

"[    1.329312] gpio gpiochip0: Static allocation of GPIO base is
deprecated, use dynamic allocation."

This patch removes the static allocation of GPIO base to get rid
of the warning message.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
---
 drivers/gpio/gpio-mxc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index d5626c572d24..07948175441c 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -450,8 +450,6 @@ 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;
 
 	err = devm_gpiochip_add_data(&pdev->dev, &port->gc, port);
 	if (err)
-- 
2.34.1


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

end of thread, other threads:[~2023-02-15 15:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 22:46 [PATCH 1/1] gpio: mxc: remove static allocation of GPIO base Shenwei Wang
2023-02-15  8:29 ` Bartosz Golaszewski
2023-02-15  9:29   ` Alexander Stein
2023-02-15 15:15   ` [EXT] " Shenwei Wang

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