FAILED: patch "[PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not" failed to apply to 4.13-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.13-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
cd6bf7741cf992306748db11e1888c741d16dd0fMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <[email protected]>
Date: Mon, 18 Sep 2017 23:00:59 +0300
Subject: [PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not
presnt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
My Fujitsu-Siemens Lifebook S6120 doesn't have the FUJ02E3 device, but it does have FUJ02B1. That means we do register the backlight device (and it even seems to work), but the code will oops as soon as we try to set the backlight brightness because it's trying to call call_fext_func() with a NULL device. Let's just skip those function calls when the FUJ02E3 device is not present.
drivers/platform/x86/fujitsu-laptop.c +6 -4
@@ -254,10 +254,12 @@ static int bl_update_status(struct backlight_device *b) {struct acpi_device *device =bl_get_data (b); -if (b->props.power ==FB_BLANK_POWERDOWN ) -call_fext_func (fext,FUNC_BACKLIGHT ,0x1 ,0x4 ,0x3 ); -else -call_fext_func (fext,FUNC_BACKLIGHT ,0x1 ,0x4 ,0x0 ); +if (fext) { +if (b->props.power ==FB_BLANK_POWERDOWN ) +call_fext_func (fext,FUNC_BACKLIGHT ,0x1 ,0x4 ,0x3 ); +else +call_fext_func (fext,FUNC_BACKLIGHT ,0x1 ,0x4 ,0x0 ); + }return set_lcd_level (device, b->props.brightness); }