diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2014-05-09 21:16:21 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2014-05-09 21:16:21 +0000 |
commit | e5775748c3035131b8291eaf69ca9c9e4ccfb93e (patch) | |
tree | 6324be451385c9f9cea27381f35f300fbaa7f454 /spi25.c | |
parent | 54ea35f68b4dcf3d2fc191e30914ce2195117baa (diff) | |
download | flashrom-e5775748c3035131b8291eaf69ca9c9e4ccfb93e.tar.gz |
Add 'const' keyword to chip write and other function prototypes.
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>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1789 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi25.c')
-rw-r--r-- | spi25.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -876,8 +876,7 @@ int spi_byte_program(struct flashctx *flash, unsigned int addr, return result; } -int spi_nbyte_program(struct flashctx *flash, unsigned int addr, uint8_t *bytes, - unsigned int len) +int spi_nbyte_program(struct flashctx *flash, unsigned int addr, const uint8_t *bytes, unsigned int len) { int result; /* FIXME: Switch to malloc based on len unless that kills speed. */ @@ -983,7 +982,7 @@ int spi_read_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, * FIXME: Use the chunk code from Michael Karcher instead. * Each page is written separately in chunks with a maximum size of chunksize. */ -int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, +int spi_write_chunked(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize) { int rc = 0; @@ -1032,8 +1031,7 @@ int spi_write_chunked(struct flashctx *flash, uint8_t *buf, unsigned int start, * (e.g. due to size constraints in IT87* for over 512 kB) */ /* real chunksize is 1, logical chunksize is 1 */ -int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start, - unsigned int len) +int spi_chip_write_1(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len) { unsigned int i; int result = 0; @@ -1049,7 +1047,7 @@ int spi_chip_write_1(struct flashctx *flash, uint8_t *buf, unsigned int start, return 0; } -int default_spi_write_aai(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len) +int default_spi_write_aai(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len) { uint32_t pos = start; int result; |