mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
power: supply: max17040: remove unneeded double cast
There is no need for double explicit cast from of_device_get_match_data() (uintptr_t and then to target enum) because implicit conversion from uintptr_t to enum is straightforward (uintptr_t is a integer type). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
a837f35c5a
commit
6dfbb2cece
@ -486,8 +486,7 @@ static int max17040_probe(struct i2c_client *client,
|
||||
ret = max17040_get_of_data(chip);
|
||||
if (ret)
|
||||
return ret;
|
||||
chip_id = (enum chip_id) (uintptr_t)
|
||||
of_device_get_match_data(&client->dev);
|
||||
chip_id = (uintptr_t)of_device_get_match_data(&client->dev);
|
||||
}
|
||||
chip->data = max17040_family[chip_id];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user