leds: pm8058: Silence pointer to integer size warning
authorBjorn Andersson <bjorn.andersson@linaro.org>
Fri, 1 Dec 2017 05:16:56 +0000 (21:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Mar 2018 07:42:50 +0000 (08:42 +0100)
commit7579edac03e6f155bdb94b354d74a3a2cb9eeaec
treec1bdd809258e4e510782d845238254601aa3ccb1
parentab3db1af421005b9a33888ebe2b69cce81179b91
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>
drivers/leds/leds-pm8058.c