summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm90.c
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2023-08-10 11:31:50 +0200
committerGuenter Roeck <linux@roeck-us.net>2023-08-21 06:04:30 -0700
commit1ef2ebf2631221cf6ee975be81e95cb512f43346 (patch)
treeb4bb190a08ed8732f816c842e18db9743c9b539d /drivers/hwmon/lm90.c
parent8d84910a27ddd5c4a83df712424b7cab4ed95d3d (diff)
downloadlinux-stable-1ef2ebf2631221cf6ee975be81e95cb512f43346.tar.gz
linux-stable-1ef2ebf2631221cf6ee975be81e95cb512f43346.tar.bz2
linux-stable-1ef2ebf2631221cf6ee975be81e95cb512f43346.zip
hwmon: (lm90) fix Wvoid-pointer-to-enum-cast warning
'kind' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: lm90.c:2768:16: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230810093157.94244-8-krzysztof.kozlowski@linaro.org Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/lm90.c')
-rw-r--r--drivers/hwmon/lm90.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index b25ae8b7ec90..e0d7454a301c 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -2765,7 +2765,7 @@ static int lm90_probe(struct i2c_client *client)
/* Set the device type */
if (client->dev.of_node)
- data->kind = (enum chips)of_device_get_match_data(&client->dev);
+ data->kind = (uintptr_t)of_device_get_match_data(&client->dev);
else
data->kind = i2c_match_id(lm90_id, client)->driver_data;