spi: fix dev parameter in dev_* calls
PATCH 1/1 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 <[email protected]>
---
drivers/mtd/spi/spi-nor-core.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
drivers/mtd/spi/spi-nor-core.c +11 -8
@@ -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 ; }
Signature · 1 line
2.17.1