Commit 0e18d457 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown

ASoC: fix rockchip 64-bit build warning

The rk_spdif_probe uses the device match data as a token to identify a
particular device, but accidentally casts a pointer to 'int', which is
not portable, as gcc points out in this warning on arm64:

rockchip_spdif.c: In function 'rk_spdif_probe':
rockchip_spdif.c:283:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

This changes the logic to compare two pointer values instead, using
the same cast that was used for initializing the value in the first
place.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8005c49d
...@@ -280,7 +280,7 @@ static int rk_spdif_probe(struct platform_device *pdev) ...@@ -280,7 +280,7 @@ static int rk_spdif_probe(struct platform_device *pdev)
int ret; int ret;
match = of_match_node(rk_spdif_match, np); match = of_match_node(rk_spdif_match, np);
if ((int) match->data == RK_SPDIF_RK3288) { if (match->data == (void *)RK_SPDIF_RK3288) {
struct regmap *grf; struct regmap *grf;
grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf"); grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
......
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