diff options
author | Iskren Chernev | 2020-10-10 09:55:26 +0300 |
---|---|---|
committer | Sebastian Reichel | 2020-10-10 22:16:43 +0200 |
commit | 58d1620c4ded303b9d94fc68b23e5af1ec507de6 (patch) | |
tree | f9cd757eae4312fda24295a176967f7a796478e5 /drivers/power | |
parent | 411643e949f4e616f758e2c6079f333b0e704c49 (diff) |
power: supply: ltc2941: Fix ptr to enum cast
clang complains about casting pointers to smaller enum types.
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/supply/ltc2941-battery-gauge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/supply/ltc2941-battery-gauge.c b/drivers/power/supply/ltc2941-battery-gauge.c index 30a9014b2f95..10cd617516ec 100644 --- a/drivers/power/supply/ltc2941-battery-gauge.c +++ b/drivers/power/supply/ltc2941-battery-gauge.c @@ -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 |