From: Mukesh Ojha <mojha@codeaurora.org>
To: Anson Huang <anson.huang@nxp.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH] gpio: mxc: use devm_platform_ioremap_resource() to simplify code
Date: Mon, 1 Apr 2019 13:41:16 +0530 [thread overview]
Message-ID: <ce7c8e36-39d0-efef-eb0c-d403d8eb8801@codeaurora.org> (raw)
In-Reply-To: <1554095107-15003-1-git-send-email-Anson.Huang@nxp.com>
On 4/1/2019 10:39 AM, Anson Huang wrote:
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to
> simplify the code.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cheers,
-Mukesh
> ---
> drivers/gpio/gpio-mxc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
> index e86e61d..b281358 100644
> --- a/drivers/gpio/gpio-mxc.c
> +++ b/drivers/gpio/gpio-mxc.c
> @@ -411,7 +411,6 @@ static int mxc_gpio_probe(struct platform_device *pdev)
> {
> struct device_node *np = pdev->dev.of_node;
> struct mxc_gpio_port *port;
> - struct resource *iores;
> int irq_base;
> int err;
>
> @@ -423,8 +422,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
>
> port->dev = &pdev->dev;
>
> - iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - port->base = devm_ioremap_resource(&pdev->dev, iores);
> + port->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(port->base))
> return PTR_ERR(port->base);
>
prev parent reply other threads:[~2019-04-01 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 5:09 [PATCH] gpio: mxc: use devm_platform_ioremap_resource() to simplify code Anson Huang
2019-04-01 8:08 ` Bartosz Golaszewski
2019-04-01 8:11 ` Mukesh Ojha [this message]
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=ce7c8e36-39d0-efef-eb0c-d403d8eb8801@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=anson.huang@nxp.com \
--cc=bgolaszewski@baylibre.com \
--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).