aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/spi/spi-nor-core.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-07-19 10:15:32 -0600
committerTom Rini <trini@konsulko.com>2020-08-03 22:19:54 -0400
commite567ec849a9aba4cd683ea23bd57c878b59714c4 (patch)
treeb60237cd3ceb1dc7bc9af89d2e3329e45d364bf7 /drivers/mtd/spi/spi-nor-core.c
parentf38a29997d1cdb71a85fc9dcdbee86d952b45482 (diff)
mtd: spi-nor: Tidy up error handling / debug code
The -ENODEV error value in spi_nor_read_id() is incorrect since there clearly is a device - it just cannot be supported. Use -ENOMEDIUM instead which has the virtue of being less common. Fix the return value in spi_nor_scan(). Also there are a few printf() statements which should be debug() since they bloat the code with unused strings at present. Fix those while here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mtd/spi/spi-nor-core.c')
-rw-r--r--drivers/mtd/spi/spi-nor-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index fdcd830ce4..0113e70037 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -2470,7 +2470,7 @@ static int spi_nor_init(struct spi_nor *nor)
* designer) that this is bad.
*/
if (nor->flags & SNOR_F_BROKEN_RESET)
- printf("enabling reset hack; may not recover from unexpected reboots\n");
+ debug("enabling reset hack; may not recover from unexpected reboots\n");
set_4byte(nor, nor->info, 1);
}