]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mtd: spi-nor: Constify data to write to the Status Register
authorTudor Ambarus <tudor.ambarus@microchip.com>
Sat, 26 Oct 2019 10:34:00 +0000 (13:34 +0300)
committerTudor Ambarus <tudor.ambarus@microchip.com>
Fri, 1 Nov 2019 08:20:45 +0000 (10:20 +0200)
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>
drivers/mtd/spi-nor/spi-nor.c

index 2012883dbbff445b1bf46a3e68d16f99d2324fba..46965cc945341fcd8fb74082cfd435e21e474169 100644 (file)
@@ -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 =