lkml.org 
[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.15 066/128] leds: pm8058: Silence pointer to integer size warning
    Date
    4.15-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Bjorn Andersson <bjorn.andersson@linaro.org>


    [ 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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/leds/leds-pm8058.c
    +++ b/drivers/leds/leds-pm8058.c
    @@ -106,7 +106,7 @@ static int pm8058_led_probe(struct platf
    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) {

    \
     
     \ /
      Last update: 2018-03-16 17:05    [W:8.207 / U:0.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site