diff options
author | Sean Anderson <seanga2@gmail.com> | 2020-09-15 10:44:44 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-30 08:52:44 -0400 |
commit | 6dcc2819ae984ddbcdd63cee0a4319f150f46a9f (patch) | |
tree | 55ca9ff631fd605f14e1595779f69b02e7377939 /drivers/mtd/nand/spi | |
parent | 8985e1cf91db9826508a48ceb0ae764a81ea10c4 (diff) | |
download | u-boot-6dcc2819ae984ddbcdd63cee0a4319f150f46a9f.zip u-boot-6dcc2819ae984ddbcdd63cee0a4319f150f46a9f.tar.gz u-boot-6dcc2819ae984ddbcdd63cee0a4319f150f46a9f.tar.bz2 |
mtd: spi-nand: Fix not calling dev_err with a device
Get it from spinand->slave->dev. Another option would be to use
spinand_to_mtd(spinand)->dev, but this is what the existing code uses.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/mtd/nand/spi')
-rw-r--r-- | drivers/mtd/nand/spi/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index 93371fd..8c7e07d 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -984,13 +984,13 @@ static int spinand_detect(struct spinand_device *spinand) ret = spinand_manufacturer_detect(spinand); if (ret) { - dev_err(dev, "unknown raw ID %*phN\n", SPINAND_MAX_ID_LEN, - spinand->id.data); + dev_err(spinand->slave->dev, "unknown raw ID %*phN\n", + SPINAND_MAX_ID_LEN, spinand->id.data); return ret; } if (nand->memorg.ntargets > 1 && !spinand->select_target) { - dev_err(dev, + dev_err(spinand->slave->dev, "SPI NANDs with more than one die must implement ->select_target()\n"); return -EINVAL; } @@ -1076,7 +1076,7 @@ static int spinand_init(struct spinand_device *spinand) ret = spinand_manufacturer_init(spinand); if (ret) { - dev_err(dev, + dev_err(spinand->slave->dev, "Failed to initialize the SPI NAND chip (err = %d)\n", ret); goto err_free_bufs; |