mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
gpio: realtek-otto: use larger type for dev_flags
Fix a build failure on 64-bit systems uncovered by enabling
COMPILE_TEST:
drivers/gpio/gpio-realtek-otto.c: In function ‘realtek_gpio_probe’:
drivers/gpio/gpio-realtek-otto.c:375:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
375 | dev_flags = (unsigned int) device_get_match_data(dev);
| ^
Fixes: 3203d8f573 ("gpio: realtek-otto: add COMPILE_TEST")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512180532.2ykNwYAm-lkp@intel.com/
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://lore.kernel.org/r/20251217202331.9449-1-rosenp@gmail.com
[Bartosz: tweaked commit message, changed the cast, added tags]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
This commit is contained in:
parent
f48b5e8bc2
commit
47d8cb6780
1 changed files with 2 additions and 3 deletions
|
|
@ -359,8 +359,7 @@ static int realtek_gpio_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct gpio_generic_chip_config config;
|
||||
struct device *dev = &pdev->dev;
|
||||
unsigned long gen_gc_flags;
|
||||
unsigned int dev_flags;
|
||||
unsigned long gen_gc_flags, dev_flags;
|
||||
struct gpio_irq_chip *girq;
|
||||
struct realtek_gpio_ctrl *ctrl;
|
||||
struct resource *res;
|
||||
|
|
@ -372,7 +371,7 @@ static int realtek_gpio_probe(struct platform_device *pdev)
|
|||
if (!ctrl)
|
||||
return -ENOMEM;
|
||||
|
||||
dev_flags = (unsigned int) device_get_match_data(dev);
|
||||
dev_flags = (uintptr_t)device_get_match_data(dev);
|
||||
|
||||
ngpios = REALTEK_GPIO_MAX;
|
||||
device_property_read_u32(dev, "ngpios", &ngpios);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue