From: Thomas Zimmermann <tzimmermann@suse.de>
To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Jonathan Woithe <jwoithe@just42.net>
Subject: [PATCH 07/10] platform/x86: fujitsu-laptop: Use backlight power constants
Date: Wed, 31 Jul 2024 14:50:57 +0200 [thread overview]
Message-ID: <20240731125220.1147348-8-tzimmermann@suse.de> (raw)
In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de>
Replace FB_BLANK_ constants with their counterparts from the
backlight subsystem. The values are identical, so there's no
change in functionality or semantics.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jonathan Woithe <jwoithe@just42.net>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
---
drivers/platform/x86/fujitsu-laptop.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 968fc91bd5e4..ae992ac1ab4a 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -43,7 +43,6 @@
#include <linux/bitops.h>
#include <linux/dmi.h>
#include <linux/backlight.h>
-#include <linux/fb.h>
#include <linux/input.h>
#include <linux/input/sparse-keymap.h>
#include <linux/kfifo.h>
@@ -356,7 +355,7 @@ static int bl_get_brightness(struct backlight_device *b)
{
struct acpi_device *device = bl_get_data(b);
- return b->props.power == FB_BLANK_POWERDOWN ? 0 : get_lcd_level(device);
+ return b->props.power == BACKLIGHT_POWER_OFF ? 0 : get_lcd_level(device);
}
static int bl_update_status(struct backlight_device *b)
@@ -364,7 +363,7 @@ static int bl_update_status(struct backlight_device *b)
struct acpi_device *device = bl_get_data(b);
if (fext) {
- if (b->props.power == FB_BLANK_POWERDOWN)
+ if (b->props.power == BACKLIGHT_POWER_OFF)
call_fext_func(fext, FUNC_BACKLIGHT, 0x1,
BACKLIGHT_PARAM_POWER, BACKLIGHT_OFF);
else
@@ -933,9 +932,9 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)
acpi_video_get_backlight_type() == acpi_backlight_vendor) {
if (call_fext_func(fext, FUNC_BACKLIGHT, 0x2,
BACKLIGHT_PARAM_POWER, 0x0) == BACKLIGHT_OFF)
- fujitsu_bl->bl_device->props.power = FB_BLANK_POWERDOWN;
+ fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_OFF;
else
- fujitsu_bl->bl_device->props.power = FB_BLANK_UNBLANK;
+ fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_ON;
}
ret = acpi_fujitsu_laptop_input_setup(device);
--
2.45.2
next prev parent reply other threads:[~2024-07-31 12:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-31 12:50 [PATCH 00/10] platform: x86: Use backlight power constants Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 01/10] platform/x86: acer-wmi: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 02/10] platform/x86: asus-laptop: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 03/10] platform/x86: asus-nb-wmi: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 04/10] platform/x86: asus-wmi: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 05/10] platform/x86: eeepc-laptop: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 06/10] platform/x86: eeepc-wmi: " Thomas Zimmermann
2024-07-31 12:50 ` Thomas Zimmermann [this message]
2024-07-31 13:21 ` [PATCH 07/10] platform/x86: fujitsu-laptop: " Jonathan Woithe
2024-07-31 12:50 ` [PATCH 08/10] platform/x86: ideapad-laptop: " Thomas Zimmermann
2024-07-31 12:50 ` [PATCH 09/10] platform/x86: oaktrail: " Thomas Zimmermann
2024-07-31 12:51 ` [PATCH 10/10] platform/x86: samsung-laptop: " Thomas Zimmermann
2024-08-12 14:29 ` [PATCH 00/10] platform: x86: " Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240731125220.1147348-8-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jwoithe@just42.net \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox