Skip to content
Snippets Groups Projects
Commit 8343f8a7 authored by Wolfgang Denk's avatar Wolfgang Denk
Browse files

post/drivers/i2c.c: fix compile error


Commit 7e263cea "post/i2c: Clean up detection logic" added a "const"
qualifier to the declaration of i2c_addr_list[], missing the fact that
the list gets modified later in the code, which results in build
errors like these:

i2c.c: In function 'i2c_post_test':
i2c.c:88: error: assignment of read-only location

Remove the incorrect "const".

Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Heiko Schocher <hs@denx.de>
Acked-by: default avatarHeiko Schocher <hs@denx.de>
parent 79e63139
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ int i2c_post_test (int flags) ...@@ -74,7 +74,7 @@ int i2c_post_test (int flags)
#else #else
unsigned int ret = 0; unsigned int ret = 0;
int j; int j;
const unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS; unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
/* Start at address 1, address 0 is the general call address */ /* Start at address 1, address 0 is the general call address */
for (i = 1; i < 128; i++) { for (i = 1; i < 128; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment