summaryrefslogtreecommitdiffstats
path: root/linux_spi.c
diff options
context:
space:
mode:
authorMark Marshall <mark.marshall@omicron.at>2014-05-09 21:16:21 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2014-05-09 21:16:21 +0000
commitf20b7beff054eb316088d590094d9efbc68dbee1 (patch)
tree6324be451385c9f9cea27381f35f300fbaa7f454 /linux_spi.c
parent20da4aa82cc11f25a6a4a52fd2bed219e6e1d829 (diff)
downloadast2050-flashrom-f20b7beff054eb316088d590094d9efbc68dbee1.zip
ast2050-flashrom-f20b7beff054eb316088d590094d9efbc68dbee1.tar.gz
Add 'const' keyword to chip write and other function prototypes
Corresponding to flashrom svn r1789. Inspired by and mostly based on a patch Signed-off-by: Mark Marshall <mark.marshall@omicron.at> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'linux_spi.c')
-rw-r--r--linux_spi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/linux_spi.c b/linux_spi.c
index f0c6404..695032c 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -43,7 +43,7 @@ static int linux_spi_send_command(struct flashctx *flash, unsigned int writecnt,
unsigned char *rxbuf);
static int linux_spi_read(struct flashctx *flash, uint8_t *buf,
unsigned int start, unsigned int len);
-static int linux_spi_write_256(struct flashctx *flash, uint8_t *buf,
+static int linux_spi_write_256(struct flashctx *flash, const uint8_t *buf,
unsigned int start, unsigned int len);
static const struct spi_programmer spi_programmer_linux = {
@@ -179,8 +179,7 @@ static int linux_spi_read(struct flashctx *flash, uint8_t *buf,
(unsigned int)getpagesize());
}
-static int linux_spi_write_256(struct flashctx *flash, uint8_t *buf,
- unsigned int start, unsigned int len)
+static int linux_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
{
return spi_write_chunked(flash, buf, start, len,
((unsigned int)getpagesize()) - 4);
OpenPOWER on IntegriCloud