linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT
Date: Thu, 2 Apr 2015 11:08:39 +0200	[thread overview]
Message-ID: <551D0717.6090703@atmel.com> (raw)
In-Reply-To: <1427955227-8927-1-git-send-email-josh.wu@atmel.com>

Le 02/04/2015 08:13, Josh Wu a ?crit :
> if atmel,pmecc-lookup-table-offset is not found in DT node, we don't
> need to map the ROM table as we will build a runtime gf table anyway.
> 
> Reported-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Seems good:
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

> Signed-off-by: Josh Wu <josh.wu@atmel.com>
> ---
> 
>  drivers/mtd/nand/atmel_nand.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 0361c19..46010bd 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -1204,14 +1204,14 @@ static int atmel_pmecc_nand_init_params(struct platform_device *pdev,
>  		goto err;
>  	}
>  
> -	regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> -	host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev, regs_rom);
> -	if (IS_ERR(host->pmecc_rom_base)) {
> -		if (!host->has_no_lookup_table)
> -			/* Don't display the information again */
> +	if (!host->has_no_lookup_table) {
> +		regs_rom = platform_get_resource(pdev, IORESOURCE_MEM, 3);
> +		host->pmecc_rom_base = devm_ioremap_resource(&pdev->dev,
> +								regs_rom);
> +		if (IS_ERR(host->pmecc_rom_base)) {
>  			dev_err(host->dev, "Can not get I/O resource for ROM, will build a lookup table in runtime!\n");
> -
> -		host->has_no_lookup_table = true;
> +			host->has_no_lookup_table = true;
> +		}
>  	}
>  
>  	if (host->has_no_lookup_table) {
> 


-- 
Nicolas Ferre

  reply	other threads:[~2015-04-02  9:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  6:13 [PATCH] mtd: atmel_nand: don't map the ROM table if no pmecc table offset in DT Josh Wu
2015-04-02  9:08 ` Nicolas Ferre [this message]
2015-04-06  1:00 ` Brian Norris

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=551D0717.6090703@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.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).