]> Git Repo - linux.git/commitdiff
Input: ads7846 - fix pointer cast warning
authorArnd Bergmann <[email protected]>
Fri, 9 Jun 2023 20:20:56 +0000 (22:20 +0200)
committerArnd Bergmann <[email protected]>
Fri, 9 Jun 2023 21:16:49 +0000 (23:16 +0200)
The previous bugfix caused a warning on 64-bit builds:

drivers/input/touchscreen/ads7846.c:1126:17: warning: cast to smaller integer type 'u32' (aka 'unsigned int') from 'const void *' [-Wvoid-pointer-to-int-cast]

Change the cast back to something that works on both 32-bit and 64-bit
kernels.

Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: 8f7913c04f6a7 ("Input: ads7846 - Fix usage of match data")
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
drivers/input/touchscreen/ads7846.c

index fe6fe8acd8a66acb2d588502a902a779cface6fe..faea40dd66d01862f22e6fc50a95e4c044abfbb1 100644 (file)
@@ -1123,7 +1123,7 @@ static const struct ads7846_platform_data *ads7846_get_props(struct device *dev)
        if (!pdata)
                return ERR_PTR(-ENOMEM);
 
-       pdata->model = (u32)device_get_match_data(dev);
+       pdata->model = (uintptr_t)device_get_match_data(dev);
 
        device_property_read_u16(dev, "ti,vref-delay-usecs",
                                 &pdata->vref_delay_usecs);
This page took 0.050521 seconds and 4 git commands to generate.