Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Thomas 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.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Thomas Zimmermann and committed by
Hans de Goede
f6619520 6ecf83ea

+3 -4
+3 -4
drivers/platform/x86/ideapad-laptop.c
··· 17 17 #include <linux/debugfs.h> 18 18 #include <linux/device.h> 19 19 #include <linux/dmi.h> 20 - #include <linux/fb.h> 21 20 #include <linux/i8042.h> 22 21 #include <linux/init.h> 23 22 #include <linux/input.h> ··· 1255 1256 return err; 1256 1257 1257 1258 err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER, 1258 - blightdev->props.power != FB_BLANK_POWERDOWN); 1259 + blightdev->props.power != BACKLIGHT_POWER_OFF); 1259 1260 if (err) 1260 1261 return err; 1261 1262 ··· 1305 1306 1306 1307 priv->blightdev = blightdev; 1307 1308 blightdev->props.brightness = now; 1308 - blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; 1309 + blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; 1309 1310 1310 1311 backlight_update_status(blightdev); 1311 1312 ··· 1329 1330 if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power)) 1330 1331 return; 1331 1332 1332 - blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; 1333 + blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; 1333 1334 } 1334 1335 1335 1336 static void ideapad_backlight_notify_brightness(struct ideapad_private *priv)