aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorTudor Ambarus <tudor.ambarus@microchip.com>2019-10-26 13:34:00 +0300
committerTudor Ambarus <tudor.ambarus@microchip.com>2019-11-01 10:20:45 +0200
commitcc86f3e705981d9cb07aa8b0f5a2eabec999e341 (patch)
treec5caacf1856003915c611cdc92949aea1f6eddbd /drivers/mtd
parentmtd: spi-nor: Fix retlen handling in sst_write() (diff)
downloadlinux-dev-cc86f3e705981d9cb07aa8b0f5a2eabec999e341.tar.xz
linux-dev-cc86f3e705981d9cb07aa8b0f5a2eabec999e341.zip
mtd: spi-nor: Constify data to write to the Status Register
Constify the data to write to the Status Register. Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/spi-nor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c
index 2012883dbbff..46965cc94534 100644
--- a/drivers/mtd/spi-nor/spi-nor.c
+++ b/drivers/mtd/spi-nor/spi-nor.c
@@ -787,7 +787,7 @@ static int spi_nor_wait_till_ready(struct spi_nor *nor)
* second byte will be written to the configuration register.
* Return negative if error occurred.
*/
-static int spi_nor_write_sr_cr(struct spi_nor *nor, u8 *sr_cr)
+static int spi_nor_write_sr_cr(struct spi_nor *nor, const u8 *sr_cr)
{
int ret;
@@ -837,7 +837,7 @@ static int spi_nor_write_sr_and_check(struct spi_nor *nor, u8 status_new,
return ((nor->bouncebuf[0] & mask) != (status_new & mask)) ? -EIO : 0;
}
-static int spi_nor_write_sr2(struct spi_nor *nor, u8 *sr2)
+static int spi_nor_write_sr2(struct spi_nor *nor, const u8 *sr2)
{
if (nor->spimem) {
struct spi_mem_op op =