Commit 8343f8a76434b7162cf5a4da5f456b014868853c

Authored by Wolfgang Denk
1 parent 79e6313936

post/drivers/i2c.c: fix compile error

Commit 7e263ce "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: Wolfgang Denk <wd@denx.de>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -74,7 +74,7 @@
74 74 #else
75 75 unsigned int ret = 0;
76 76 int j;
77   - const unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
  77 + unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
78 78  
79 79 /* Start at address 1, address 0 is the general call address */
80 80 for (i = 1; i < 128; i++) {