]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: spi-nor: core: Use auto-detection only once
authorTudor Ambarus <tudor.ambarus@microchip.com>
Wed, 20 Apr 2022 10:34:19 +0000 (13:34 +0300)
committerPratyush Yadav <p.yadav@ti.com>
Wed, 27 Apr 2022 09:27:35 +0000 (14:57 +0530)
commit41fe18b0c4123912f0307bd1b3cf5c1549451e02
tree995cbd4bbec279ebdcead882ac28fe918e8b7a9b
parent4e1d5ddb2a1b4f92d22d6c1529fcfde58fd346db
mtd: spi-nor: core: Use auto-detection only once

In case spi_nor_match_name() returned NULL, the auto detection was
issued twice. There's no reason to try to detect the same chip twice,
do the auto detection only once.

Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Link: https://lore.kernel.org/r/20220420103427.47867-4-tudor.ambarus@microchip.com
drivers/mtd/spi-nor/core.c