OSDN Git Service

mtd: rawnand: do not execute nand_scan_ident() if maxchips is zero
authorMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 25 Jul 2018 13:31:42 +0000 (15:31 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 31 Jul 2018 07:46:09 +0000 (09:46 +0200)
commit49aa76b166765188af6682cd22985cbda1bb39c2
treec6e44bd615c32791c353f588017e3b3efc8aa61d
parent577e010c24bceb80dbbc146b2a4bd7ff0527fa9b
mtd: rawnand: do not execute nand_scan_ident() if maxchips is zero

Some driver (eg. docg4) will need to handle themselves the
identification phase. As part of the migration to use nand_scan()
everywhere (which will unconditionnaly call nand_scan_ident()), we add
a condition at the start of nand_scan_with_ids() to jump over
nand_scan_ident() if the maxchips parameters is zero, meaning that the
driver does not want the core to handle this phase.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
drivers/mtd/nand/raw/nand_base.c