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 /at45db.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 'at45db.c')
-rw-r--r-- | at45db.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -460,7 +460,7 @@ int spi_erase_at45cs_sector(struct flashctx *flash, unsigned int addr, unsigned return at45db_erase(flash, opcode, at45db_convert_addr(addr, page_size), 200000, 100); } -static int at45db_fill_buffer1(struct flashctx *flash, uint8_t *bytes, unsigned int off, unsigned int len) +static int at45db_fill_buffer1(struct flashctx *flash, const uint8_t *bytes, unsigned int off, unsigned int len) { const unsigned int page_size = flash->chip->page_size; if ((off + len) > page_size) { @@ -518,7 +518,7 @@ static int at45db_commit_buffer1(struct flashctx *flash, unsigned int at45db_add return 0; } -static int at45db_program_page(struct flashctx *flash, uint8_t *buf, unsigned int at45db_addr) +static int at45db_program_page(struct flashctx *flash, const uint8_t *buf, unsigned int at45db_addr) { int ret = at45db_fill_buffer1(flash, buf, 0, flash->chip->page_size); if (ret != 0) { @@ -535,7 +535,7 @@ static int at45db_program_page(struct flashctx *flash, uint8_t *buf, unsigned in return 0; } -int spi_write_at45db(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len) +int spi_write_at45db(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len) { const unsigned int page_size = flash->chip->page_size; const unsigned int total_size = flash->chip->total_size; |