mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
ASoC: codecs: wm8904: Fix Wvoid-pointer-to-enum-cast warning
'devtype' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: wm8904.c:2205:21: error: cast to smaller integer type 'enum wm8904_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20230815143204.379708-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
66de320b02
commit
5a18033249
@ -2202,7 +2202,7 @@ static int wm8904_i2c_probe(struct i2c_client *i2c)
|
||||
match = of_match_node(wm8904_of_match, i2c->dev.of_node);
|
||||
if (match == NULL)
|
||||
return -EINVAL;
|
||||
wm8904->devtype = (enum wm8904_type)match->data;
|
||||
wm8904->devtype = (uintptr_t)match->data;
|
||||
} else {
|
||||
const struct i2c_device_id *id =
|
||||
i2c_match_id(wm8904_i2c_id, i2c);
|
||||
|
Loading…
Reference in New Issue
Block a user