aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorMichael Karcher <kernel@mkarcher.dialup.fu-berlin.de>2015-01-18 20:28:46 +0100
committerDarren Hart <dvhart@linux.intel.com>2015-01-23 09:09:25 -0800
commite8549e2cf3dc3ab3222a71eac551eea9769ce86b (patch)
tree60949a39599abb826e83391a21109ec86c504efd /drivers/platform
parentsamsung-laptop: Add use_native_backlight quirk, and enable it on some models (diff)
downloadlinux-dev-e8549e2cf3dc3ab3222a71eac551eea9769ce86b.tar.xz
linux-dev-e8549e2cf3dc3ab3222a71eac551eea9769ce86b.zip
fujitsu-laptop: use FB_BLANK_* constants
Replace the magic numbers in fujitsu-laptop.c by the appropriate FB_BLANK constants, as indicated by the comment for backlight_properties.power in include/linux/backlight.h. Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Acked-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/fujitsu-laptop.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 7c21c1c44dfa..2a9afa261c61 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -64,6 +64,7 @@
#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/backlight.h>
+#include <linux/fb.h>
#include <linux/input.h>
#include <linux/kfifo.h>
#include <linux/platform_device.h>
@@ -398,7 +399,7 @@ static int bl_get_brightness(struct backlight_device *b)
static int bl_update_status(struct backlight_device *b)
{
int ret;
- if (b->props.power == 4)
+ if (b->props.power == FB_BLANK_POWERDOWN)
ret = call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x3);
else
ret = call_fext_func(FUNC_BACKLIGHT, 0x1, 0x4, 0x0);
@@ -1139,9 +1140,9 @@ static int __init fujitsu_init(void)
if (!acpi_video_backlight_support()) {
if (call_fext_func(FUNC_BACKLIGHT, 0x2, 0x4, 0x0) == 3)
- fujitsu->bl_device->props.power = 4;
+ fujitsu->bl_device->props.power = FB_BLANK_POWERDOWN;
else
- fujitsu->bl_device->props.power = 0;
+ fujitsu->bl_device->props.power = FB_BLANK_UNBLANK;
}
pr_info("driver " FUJITSU_DRIVER_VERSION " successfully loaded\n");