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>
diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 475f6c3..b959e34 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -119,7 +119,7 @@
struct erase_info instr;
if (offset % mtd->erasesize || len % mtd->erasesize) {
- printf("SF: Erase offset/length not multiple of erase size\n");
+ debug("SF: Erase offset/length not multiple of erase size\n");
return -EINVAL;
}