Constify dediprog's write functions too
I forgot doing so in r1789 which broke compiling the dediprog module with
-Werror (which is default). Thanks to Mike Hibbett for reporting this.
Corresponding to flashrom svn r1797.
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
diff --git a/dediprog.c b/dediprog.c
index 2640808..358cac0 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -306,7 +306,7 @@
* @dedi_spi_cmd dediprog specific write command for spi bus
* @return 0 on success, 1 on failure
*/
-static int dediprog_spi_bulk_write(struct flashctx *flash, uint8_t *buf, unsigned int chunksize,
+static int dediprog_spi_bulk_write(struct flashctx *flash, const uint8_t *buf, unsigned int chunksize,
unsigned int start, unsigned int len, uint8_t dedi_spi_cmd)
{
int ret;
@@ -366,7 +366,7 @@
return 0;
}
-static int dediprog_spi_write(struct flashctx *flash, uint8_t *buf,
+static int dediprog_spi_write(struct flashctx *flash, const uint8_t *buf,
unsigned int start, unsigned int len, uint8_t dedi_spi_cmd)
{
int ret;
@@ -418,12 +418,12 @@
return 0;
}
-static int dediprog_spi_write_256(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
+static int dediprog_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
{
return dediprog_spi_write(flash, buf, start, len, DEDI_SPI_CMD_PAGEWRITE);
}
-static int dediprog_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
+static int dediprog_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
{
return dediprog_spi_write(flash, buf, start, len, DEDI_SPI_CMD_AAIWRITE);
}