Skip to content

Commit

Permalink
i2c-ocores: Fix pointer type mismatch error
Browse files Browse the repository at this point in the history
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

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: linux-i2c@vger.kernel.org
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Grant Likely authored and Ben Dooks committed Mar 8, 2011
1 parent 120bdaa commit 12c3832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-ocores.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 12c3832

Please sign in to comment.