summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2017-11-30 21:16:56 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-19 09:09:53 +0100
commite99d334f6d7f4c00290993b000f154be83299986 (patch)
tree59444285b339144c4e025bcd155d5f735f72b2db /drivers/leds
parentb116b9ca82d82d269a47e1118fa82e68fea64af1 (diff)
leds: pm8058: Silence pointer to integer size warning
[ Upstream commit 8f52df50d9366f770a894d14ef724e5e04574e98 ] 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: 7f866986e705 ("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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-pm8058.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pm8058.c b/drivers/leds/leds-pm8058.c
index a52674327857..8988ba3b2d65 100644
--- a/drivers/leds/leds-pm8058.c
+++ b/drivers/leds/leds-pm8058.c
@@ -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) {