OSDN Git Service

platform/x86: fujitsu-laptop: ignore errors when setting backlight power
authorMichał Kępień <kernel@kempniu.pl>
Wed, 5 Apr 2017 06:49:07 +0000 (08:49 +0200)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 13 Apr 2017 17:16:06 +0000 (10:16 -0700)
Not all Fujitsu laptops support controlling backlight power through the
FUJ02E3 ACPI device.  Remove the debug message informing about a failed
attempt to set backlight power as it may be confusing and the return
value of call_fext_func() is logged anyway.

Signed-off-by: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c

index e745919..66a5eec 100644 (file)
@@ -430,13 +430,9 @@ static int bl_update_status(struct backlight_device *b)
 {
        int ret;
        if (b->props.power == FB_BLANK_POWERDOWN)
-               ret = call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x3);
+               call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x3);
        else
-               ret = call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x0);
-       if (ret != 0)
-               vdbg_printk(FUJLAPTOP_DBG_ERROR,
-                       "Unable to adjust backlight power, error code %i\n",
-                       ret);
+               call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x0);
 
        ret = set_lcd_level(b->props.brightness);
        if (ret != 0)