From 8343f8a76434b7162cf5a4da5f456b014868853c Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 26 Oct 2010 23:22:36 +0200 Subject: [PATCH] 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 Cc: Peter Tyser Cc: Heiko Schocher Acked-by: Heiko Schocher --- post/drivers/i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c index 3080e81b5b..4a1b1a49d1 100644 --- a/post/drivers/i2c.c +++ b/post/drivers/i2c.c @@ -74,7 +74,7 @@ int i2c_post_test (int flags) #else unsigned int ret = 0; 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 */ for (i = 1; i < 128; i++) { -- 2.39.5