mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
leds: pm8058: Silence pointer to integer size warning
[ Upstream commit8f52df50d9
] The pointer returned by of_device_get_match_data() doesn't have the same size as u32 on 64-bit architectures, causing a compile warning when compile-testing the driver on such platform. Cast the return value of of_device_get_match_data() to unsigned long and then to u32 to silence this warning. Fixes:7f866986e7
("leds: add PM8058 LEDs driver") Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ab3db1af42
commit
7579edac03
1 changed files with 1 additions and 1 deletions
|
@ -106,7 +106,7 @@ static int pm8058_led_probe(struct platform_device *pdev)
|
|||
if (!led)
|
||||
return -ENOMEM;
|
||||
|
||||
led->ledtype = (u32)of_device_get_match_data(&pdev->dev);
|
||||
led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev);
|
||||
|
||||
map = dev_get_regmap(pdev->dev.parent, NULL);
|
||||
if (!map) {
|
||||
|
|
Loading…
Reference in a new issue