summaryrefslogtreecommitdiff
path: root/drivers/power/supply
diff options
context:
space:
mode:
authorIskren Chernev <iskren.chernev@gmail.com>2020-10-05 23:00:38 +0300
committerSebastian Reichel <sebastian.reichel@collabora.com>2020-10-09 00:10:32 +0200
commit7f977e64370dad07b01601bb2ba959678a149ff3 (patch)
tree2139de68d7bbf0d38b977a10db1788b64507adb0 /drivers/power/supply
parentd4fbca833b72cb58297df35a32cce77cd6409707 (diff)
power: supply: max17040: Fix ptr to enum cast
clang complains about casting pointers to smaller enum types. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply')
-rw-r--r--drivers/power/supply/max17040_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/max17040_battery.c b/drivers/power/supply/max17040_battery.c
index 1d7510a59295..d956c67d5155 100644
--- a/drivers/power/supply/max17040_battery.c
+++ b/drivers/power/supply/max17040_battery.c
@@ -247,7 +247,7 @@ static int max17040_get_of_data(struct max17040_chip *chip)
{
struct device *dev = &chip->client->dev;
struct chip_data *data = &max17040_family[
- (enum chip_id) of_device_get_match_data(dev)];
+ (uintptr_t) of_device_get_match_data(dev)];
int rcomp_len;
u8 rcomp[2];