From: Stefan Agner <stefan@agner.ch>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Lucas Stach <dev@lynxeye.de>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mtd: rawnand: tegra: Make use of the helper function devm_platform_ioremap_resource()
Date: Fri, 03 Sep 2021 10:23:45 +0200 [thread overview]
Message-ID: <fb7aec944e72f91a9a33d7d37d0cbb44@agner.ch> (raw)
In-Reply-To: <20210901074230.9483-1-caihuoqing@baidu.com>
On 2021-09-01 09:42, Cai Huoqing wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Acked-by: Stefan Agner <stefan@agner.ch>
> ---
> drivers/mtd/nand/raw/tegra_nand.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/tegra_nand.c
> b/drivers/mtd/nand/raw/tegra_nand.c
> index fbf67722a049..32431bbe69b8 100644
> --- a/drivers/mtd/nand/raw/tegra_nand.c
> +++ b/drivers/mtd/nand/raw/tegra_nand.c
> @@ -1144,7 +1144,6 @@ static int tegra_nand_probe(struct platform_device *pdev)
> {
> struct reset_control *rst;
> struct tegra_nand_controller *ctrl;
> - struct resource *res;
> int err = 0;
>
> ctrl = devm_kzalloc(&pdev->dev, sizeof(*ctrl), GFP_KERNEL);
> @@ -1155,8 +1154,7 @@ static int tegra_nand_probe(struct platform_device *pdev)
> nand_controller_init(&ctrl->controller);
> ctrl->controller.ops = &tegra_nand_controller_ops;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - ctrl->regs = devm_ioremap_resource(&pdev->dev, res);
> + ctrl->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(ctrl->regs))
> return PTR_ERR(ctrl->regs);
next prev parent reply other threads:[~2021-09-03 8:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 7:42 Cai Huoqing
2021-09-03 8:23 ` Stefan Agner [this message]
2021-09-14 17:39 ` Miquel Raynal
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=fb7aec944e72f91a9a33d7d37d0cbb44@agner.ch \
--to=stefan@agner.ch \
--cc=caihuoqing@baidu.com \
--cc=dev@lynxeye.de \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-tegra@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=thierry.reding@gmail.com \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®