linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shenwei Wang <shenwei.wang@nxp.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-gpio@vger.kernel.org, imx@lists.linux.dev,
	Shenwei Wang <shenwei.wang@nxp.com>
Subject: [PATCH 1/1] gpio: mxc: remove static allocation of GPIO base
Date: Tue, 14 Feb 2023 16:46:42 -0600	[thread overview]
Message-ID: <20230214224642.3804927-1-shenwei.wang@nxp.com> (raw)

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


             reply	other threads:[~2023-02-14 22:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 22:46 Shenwei Wang [this message]
2023-02-15  8:29 ` [PATCH 1/1] gpio: mxc: remove static allocation of GPIO base Bartosz Golaszewski
2023-02-15  9:29   ` Alexander Stein
2023-02-15 15:15   ` [EXT] " Shenwei Wang

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=20230214224642.3804927-1-shenwei.wang@nxp.com \
    --to=shenwei.wang@nxp.com \
    --cc=brgl@bgdev.pl \
    --cc=imx@lists.linux.dev \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@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).