Skip to contentSkip to conversation

Fix up a pointer-integer size mismatch warning in tps65217_probe()

PATCH In review David Howells 1 participant 1 message Jan 3, 2014

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

PATCH 4/7 Fix up a pointer-integer size mismatch warning in tps65217_probe()

Fix up the following pointer-integer size mismatch warning in tps65217_probe():

	drivers/mfd/tps65217.c: In function 'tps65217_probe':
	drivers/mfd/tps65217.c:173:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
	   chip_id = (unsigned int)match->data;
		     ^
cc AnilKumar Ch <[email protected]>
cc Samuel Ortiz <[email protected]>

---

 drivers/mfd/tps65217.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/tps65217.c +1 -1
index b7be0b295575..66195edc0ef4 100644
@@ -170,7 +170,7 @@ static int tps65217_probe(struct i2c_client *client,
 				"Failed to find matching dt id\n");
 			return -EINVAL;
 		}
-		chip_id = (unsigned int)match->data;
+		chip_id = (unsigned int)(unsigned long)match->data;
 		status_off = of_property_read_bool(client->dev.of_node,
 					"ti,pmic-shutdown-controller");
 	}