lkml.org 
[lkml]   [2022]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/22] platform/x86: fujitsu-laptop: Use acpi_video_get_backlight_types()
Date
acpi_video_get_backlight_type() is now deprecated.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
drivers/platform/x86/fujitsu-laptop.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index b543d117b12c..e820de39cb68 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -387,7 +387,7 @@ static int acpi_fujitsu_bl_add(struct acpi_device *device)
struct fujitsu_bl *priv;
int ret;

- if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
+ if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR))
return -ENODEV;

priv = devm_kzalloc(&device->dev, sizeof(*priv), GFP_KERNEL);
@@ -819,7 +819,7 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device)

/* Sync backlight power status */
if (fujitsu_bl && fujitsu_bl->bl_device &&
- acpi_video_get_backlight_type() == acpi_backlight_vendor) {
+ (acpi_video_get_backlight_types() & 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;
--
2.37.3
\
 
 \ /
  Last update: 2022-10-24 13:42    [W:1.456 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site