mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Kerello <christophe.kerello@foss.st.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Vignesh Raghavendra <vigneshr@ti.com>,
	Richard Weinberger <richard@nod.at>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	<linux-kernel@vger.kernel.org>, <linux-mtd@lists.infradead.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [Linux-stm32] [PATCH] mtd: rawnand: stm32_fmc2: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 1 Sep 2021 17:58:36 +0200	[thread overview]
Message-ID: <a69d1484-fb7a-6da5-3d46-48c49b612d2a@foss.st.com> (raw)
In-Reply-To: <20210901074222.9433-1-caihuoqing@baidu.com>



On 9/1/21 9:42 AM, 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>
> ---
>   drivers/mtd/nand/raw/stm32_fmc2_nand.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> index 1c277fbb91f2..97b4e02e43e4 100644
> --- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> +++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c
> @@ -1899,15 +1899,11 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev)
>   
>   		nfc->data_phys_addr[chip_cs] = res->start;
>   
> -		res = platform_get_resource(pdev, IORESOURCE_MEM,
> -					    mem_region + 1);
> -		nfc->cmd_base[chip_cs] = devm_ioremap_resource(dev, res);
> +		nfc->cmd_base[chip_cs] = devm_platform_ioremap_resource(pdev, mem_region + 1);
>   		if (IS_ERR(nfc->cmd_base[chip_cs]))
>   			return PTR_ERR(nfc->cmd_base[chip_cs]);
>   
> -		res = platform_get_resource(pdev, IORESOURCE_MEM,
> -					    mem_region + 2);
> -		nfc->addr_base[chip_cs] = devm_ioremap_resource(dev, res);
> +		nfc->addr_base[chip_cs] = devm_platform_ioremap_resource(pdev, mem_region + 2);
>   		if (IS_ERR(nfc->addr_base[chip_cs]))
>   			return PTR_ERR(nfc->addr_base[chip_cs]);
>   	}
> 

Reviewed-by: Christophe Kerello <christophe.kerello@foss.st.com>

  reply	other threads:[~2021-09-01 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01  7:42 Cai Huoqing
2021-09-01 15:58 ` Christophe Kerello [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=a69d1484-fb7a-6da5-3d46-48c49b612d2a@foss.st.com \
    --to=christophe.kerello@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=caihuoqing@baidu.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --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®