From 6beaddf243b2d4bbc9165fbd89429fa1a7526af1 Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Mon, 18 Feb 2013 21:33:19 +0000 Subject: [PATCH] i2c: ocores: Fix pointer to integer cast warning After commit a000b8c1 [i2c: ocores: Add support for the GRLIB port of the controller and use function pointers for getreg and setreg function], compiling i2c-ocores.c for 64-bit gives the following warning: drivers/i2c/busses/i2c-ocores.c: In function 'ocores_i2c_of_probe': drivers/i2c/busses/i2c-ocores.c:334:15: warning: cast from pointer to integer of different size Fix it by casting the pointer to long. Signed-off-by: Jayachandran C Acked-by: Peter Korsgaard Acked-by: Andreas Larsson Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-ocores.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index a873d0ad1ac..6afa02db115 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c @@ -331,7 +331,7 @@ static int ocores_i2c_of_probe(struct platform_device *pdev, &i2c->reg_io_width); match = of_match_node(ocores_i2c_match, pdev->dev.of_node); - if (match && (int)match->data == TYPE_GRLIB) { + if (match && (long)match->data == TYPE_GRLIB) { dev_dbg(&pdev->dev, "GRLIB variant of i2c-ocores\n"); i2c->setreg = oc_setreg_grlib; i2c->getreg = oc_getreg_grlib; -- 2.46.0