* FAILED: patch "[PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not" failed to apply to 4.14-stable tree
@ 2017-11-19 11:51 gregkh
2017-11-19 22:17 ` Jonathan Woithe
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2017-11-19 11:51 UTC (permalink / raw)
To: ville.syrjala, andy, dvhart, jwoithe, stable; +Cc: stable
The patch below does not apply to the 4.14-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 <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From cd6bf7741cf992306748db11e1888c741d16dd0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
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.
Cc: Jonathan Woithe <jwoithe@just42.net>
Cc: Andy Shevchenko <andy@infradead.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org> # 4.13.x
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 85de30f93a9c..56a8195096a2 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -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);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: FAILED: patch "[PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not" failed to apply to 4.14-stable tree
2017-11-19 11:51 FAILED: patch "[PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not" failed to apply to 4.14-stable tree gregkh
@ 2017-11-19 22:17 ` Jonathan Woithe
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Woithe @ 2017-11-19 22:17 UTC (permalink / raw)
To: gregkh; +Cc: ville.syrjala, andy, dvhart, stable
On Sun, Nov 19, 2017 at 12:51:34PM +0100, gregkh@linuxfoundation.org wrote:
> The patch below does not apply to the 4.14-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 <stable@vger.kernel.org>.
This patch made it into 4.14 which is why there's a reject when trying to
apply it to 4.14-stable. It has already been applied to earlier stable
trees which required it (eg: commit 211d5eabde61c1d7759b98f1b101abd35b330e28
for 4.13-stable). Consequently I think we're all good.
Regards
jonathan
> ------------------ original commit in Linus's tree ------------------
>
> >From cd6bf7741cf992306748db11e1888c741d16dd0f Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
> 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.
>
> Cc: Jonathan Woithe <jwoithe@just42.net>
> Cc: Andy Shevchenko <andy@infradead.org>
> Signed-off-by: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> Cc: <stable@vger.kernel.org> # 4.13.x
> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
>
> diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
> index 85de30f93a9c..56a8195096a2 100644
> --- a/drivers/platform/x86/fujitsu-laptop.c
> +++ b/drivers/platform/x86/fujitsu-laptop.c
> @@ -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);
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-19 22:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-19 11:51 FAILED: patch "[PATCH] platform/x86: fujitsu-laptop: Don't oops when FUJ02E3 is not" failed to apply to 4.14-stable tree gregkh
2017-11-19 22:17 ` Jonathan Woithe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox