Commit 58d1620c authored by Iskren Chernev's avatar Iskren Chernev Committed by Sebastian Reichel
Browse files

power: supply: ltc2941: Fix ptr to enum cast



clang complains about casting pointers to smaller enum types.

Signed-off-by: default avatarIskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 411643e9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -473,7 +473,8 @@ static int ltc294x_i2c_probe(struct i2c_client *client,

	np = of_node_get(client->dev.of_node);

	info->id = (enum ltc294x_id)of_device_get_match_data(&client->dev);
	info->id = (enum ltc294x_id) (uintptr_t) of_device_get_match_data(
							&client->dev);
	info->supply_desc.name = np->name;

	/* r_sense can be negative, when sense+ is connected to the battery