Commit 7f977e64 authored by Iskren Chernev's avatar Iskren Chernev Committed by Sebastian Reichel

power: supply: max17040: Fix ptr to enum cast

clang complains about casting pointers to smaller enum types.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarIskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent d4fbca83
...@@ -247,7 +247,7 @@ static int max17040_get_of_data(struct max17040_chip *chip) ...@@ -247,7 +247,7 @@ static int max17040_get_of_data(struct max17040_chip *chip)
{ {
struct device *dev = &chip->client->dev; struct device *dev = &chip->client->dev;
struct chip_data *data = &max17040_family[ 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; int rcomp_len;
u8 rcomp[2]; u8 rcomp[2];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment