aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/fujitsu-laptop.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-11 15:39:38 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-10-11 15:39:38 +0200
commit8af4b3d7044d83c5426da6e45a9c7948bc7fa231 (patch)
tree76e15a6cea6b526fe30c679f6e9bf60b08acf983 /drivers/platform/x86/fujitsu-laptop.c
parenta5950f2617f71a3dce16520c4907bcdb31e654ba (diff)
parentc2ebf788f927dcca72beead19fab5f5aba79a098 (diff)
downloadlinux-8af4b3d7044d83c5426da6e45a9c7948bc7fa231.tar.gz
Merge branch 'acpi-pm' into pm-sleep
Diffstat (limited to 'drivers/platform/x86/fujitsu-laptop.c')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c10
1 files changed, 6 insertions, 4 deletions
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);
}