Skip to contentSkip to conversation

i2c/ocores: Fix pointer type mismatch error

PATCH New Grant Likely 1 participant 1 message Feb 28, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c/ocores: Fix pointer type mismatch error

ocores_i2c_of_probe needs to use a const __be32 type for handing device tree property values. This patch fixed the following build warning:

CC drivers/i2c/busses/i2c-ocores.o
drivers/i2c/busses/i2c-ocores.c: In function 'ocores_i2c_of_probe':
drivers/i2c/busses/i2c-ocores.c:254: warning: assignment discards qualifiers from pointer target type drivers/i2c/busses/i2c-ocores.c:261: warning: assignment discards qualifiers from pointer target type

Cc Peter Korsgaard <jacmet-OfajU3CKLf1/[email protected]>
Cc Ben Dooks <[email protected]>
---
 drivers/i2c/busses/i2c-ocores.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-ocores.c +1 -1
index c2ef5ce..1b46a9d 100644
@@ -249,7 +249,7 @@ static struct i2c_adapter ocores_adapter = {
 static int ocores_i2c_of_probe(struct platform_device* pdev,
 				struct ocores_i2c* i2c)
 {
-	__be32* val;
+	const __be32* val;
 
 	val = of_get_property(pdev->dev.of_node, "regstep", NULL);
 	if (!val) {