Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425713

Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific initialization/detection steps

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific initialization/detection steps
Date 2016-06-18 14:40 +0200
Message-ID <rLnHz-41P-1@gated-at.bofh.it> (permalink)
References <rHLp7-yc-5@gated-at.bofh.it> <rHLp8-yc-23@gated-at.bofh.it> <rLkJH-2cZ-9@gated-at.bofh.it> <rLmLv-3ra-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



Am 18.06.2016 um 13:34 schrieb Boris Brezillon:
> On Sat, 18 Jun 2016 11:23:01 +0200
> Richard Weinberger <richard@nod.at> wrote:
> 
>> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
>> index 55f3ab8..aadebe7 100644
>> --- a/drivers/mtd/nand/nand_base.c
>> +++ b/drivers/mtd/nand/nand_base.c
>> @@ -3703,6 +3703,10 @@ static int nand_detect(struct nand_chip *chip, struct nand_flash_dev *type)
>>
>>  	chip->manufacturer.ops = nand_manuf_ids[maf_idx].ops;
>>
>> +	if (!chip->manufacturer.ops)
>> +		/* assign no operations */
>> +		chip->manufacturer.ops = nand_manuf_ids[0].ops;
>> +
> 
> BTW, this is wrong, the manufacturer id code is not the index of the
> nand_manuf_ids[] table ;). If we go for this option, we should probably
> declare no_ops in nand_base.c and assign it here:
> 

Oh, yes. You are right.
Anyway, I think having a wrapper is also a good solution.

Thanks,
//richard

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific  initialization/detection steps Richard Weinberger <richard@nod.at> - 2016-06-18 11:30 +0200
  Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific  initialization/detection steps Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-18 13:40 +0200
    Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific  initialization/detection steps Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-18 13:50 +0200
  Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific  initialization/detection steps Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-06-18 13:40 +0200
    Re: [PATCH v2 05/15] mtd: nand: add manufacturer specific  initialization/detection steps Richard Weinberger <richard@nod.at> - 2016-06-18 14:40 +0200

csiph-web