mtd: spi-nor: Tidy up error handling / debug code
authorSimon Glass <sjg@chromium.org>
Sun, 19 Jul 2020 16:15:32 +0000 (10:15 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 4 Aug 2020 02:19:54 +0000 (22:19 -0400)
commite567ec849a9aba4cd683ea23bd57c878b59714c4
treeb60237cd3ceb1dc7bc9af89d2e3329e45d364bf7
parentf38a29997d1cdb71a85fc9dcdbee86d952b45482
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>
drivers/mtd/spi/sf_probe.c
drivers/mtd/spi/spi-nor-core.c
drivers/mtd/spi/spi-nor-tiny.c