summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDario Binacchi <dariobin@libero.it>2020-05-02 17:45:50 +0200
committerJagan Teki <jagan@amarulasolutions.com>2020-05-11 01:30:49 +0530
commit1fbfe58df62276910bb5624aa107415fd069f824 (patch)
tree19fe5a8f17b408b04eba5dd6d397aeef41b229a0 /drivers/mtd
parent28029c768c4761d10815f94cafbbdc86272f1d8d (diff)
downloadu-boot-1fbfe58df62276910bb5624aa107415fd069f824.tar.gz
spi: fix dev parameter in dev_* calls
Probably the non-use of the device parameter by the print routines did not generate compilation errors. Signed-off-by: Dario Binacchi <dariobin@libero.it>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi/spi-nor-core.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index e840c60f27..3d4361493e 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -56,8 +56,7 @@ static int spi_nor_read_reg(struct spi_nor *nor, u8 code, u8 *val, int len)
ret = spi_nor_read_write_reg(nor, &op, val);
if (ret < 0)
- dev_dbg(&flash->spimem->spi->dev, "error %d reading %x\n", ret,
- code);
+ dev_dbg(nor->dev, "error %d reading %x\n", ret, code);
return ret;
}
@@ -1374,7 +1373,8 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor)
/* Check current Quad Enable bit value. */
ret = read_cr(nor);
if (ret < 0) {
- dev_dbg(dev, "error while reading configuration register\n");
+ dev_dbg(nor->dev,
+ "error while reading configuration register\n");
return -EINVAL;
}
@@ -1386,7 +1386,7 @@ static int spansion_read_cr_quad_enable(struct spi_nor *nor)
/* Keep the current value of the Status Register. */
ret = read_sr(nor);
if (ret < 0) {
- dev_dbg(dev, "error while reading status register\n");
+ dev_dbg(nor->dev, "error while reading status register\n");
return -EINVAL;
}
sr_cr[0] = ret;
@@ -2069,7 +2069,8 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
err = spi_nor_read_sfdp(nor, sizeof(header),
psize, param_headers);
if (err < 0) {
- dev_err(dev, "failed to read SFDP parameter headers\n");
+ dev_err(nor->dev,
+ "failed to read SFDP parameter headers\n");
goto exit;
}
}
@@ -2099,7 +2100,8 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
switch (SFDP_PARAM_HEADER_ID(param_header)) {
case SFDP_SECTOR_MAP_ID:
- dev_info(dev, "non-uniform erase sector maps are not supported yet.\n");
+ dev_info(nor->dev,
+ "non-uniform erase sector maps are not supported yet.\n");
break;
case SFDP_SST_ID:
@@ -2111,7 +2113,8 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor,
}
if (err) {
- dev_warn(dev, "Failed to parse optional parameter table: %04x\n",
+ dev_warn(nor->dev,
+ "Failed to parse optional parameter table: %04x\n",
SFDP_PARAM_HEADER_ID(param_header));
/*
* Let's not drop all information we extracted so far
@@ -2609,7 +2612,7 @@ int spi_nor_scan(struct spi_nor *nor)
}
if (nor->addr_width > SPI_NOR_MAX_ADDR_WIDTH) {
- dev_dbg(dev, "address width is too large: %u\n",
+ dev_dbg(nor->dev, "address width is too large: %u\n",
nor->addr_width);
return -EINVAL;
}