Commit f6619520 authored by Thomas Zimmermann's avatar Thomas Zimmermann Committed by Hans de Goede

platform/x86: ideapad-laptop: Use backlight power constants

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: default avatarThomas Zimmermann <tzimmermann@suse.de>
Cc: Ike Panhc <ike.pan@canonical.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20240731125220.1147348-9-tzimmermann@suse.deReviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 6ecf83ea
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/dmi.h> #include <linux/dmi.h>
#include <linux/fb.h>
#include <linux/i8042.h> #include <linux/i8042.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/input.h> #include <linux/input.h>
...@@ -1256,7 +1255,7 @@ static int ideapad_backlight_update_status(struct backlight_device *blightdev) ...@@ -1256,7 +1255,7 @@ static int ideapad_backlight_update_status(struct backlight_device *blightdev)
return err; return err;
err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER, err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER,
blightdev->props.power != FB_BLANK_POWERDOWN); blightdev->props.power != BACKLIGHT_POWER_OFF);
if (err) if (err)
return err; return err;
...@@ -1306,7 +1305,7 @@ static int ideapad_backlight_init(struct ideapad_private *priv) ...@@ -1306,7 +1305,7 @@ static int ideapad_backlight_init(struct ideapad_private *priv)
priv->blightdev = blightdev; priv->blightdev = blightdev;
blightdev->props.brightness = now; blightdev->props.brightness = now;
blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
backlight_update_status(blightdev); backlight_update_status(blightdev);
...@@ -1330,7 +1329,7 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv) ...@@ -1330,7 +1329,7 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv)
if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power)) if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power))
return; return;
blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF;
} }
static void ideapad_backlight_notify_brightness(struct ideapad_private *priv) static void ideapad_backlight_notify_brightness(struct ideapad_private *priv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment