platform/x86: samsung-laptop: Use backlight power constants
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 31 Jul 2024 12:51:00 +0000 (14:51 +0200)
committerHans de Goede <hdegoede@redhat.com>
Mon, 12 Aug 2024 14:27:36 +0000 (16:27 +0200)
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: Corentin Chary <corentin.chary@gmail.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-11-tzimmermann@suse.de
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/samsung-laptop.c

index 3d2f8e758369d88c1293c4f25d5bcc3738505984..0d3e3ca20b1bfe77c0b1f616d09c609e10a7440b 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/pci.h>
 #include <linux/backlight.h>
 #include <linux/leds.h>
-#include <linux/fb.h>
 #include <linux/dmi.h>
 #include <linux/platform_device.h>
 #include <linux/rfkill.h>
@@ -554,7 +553,7 @@ static int update_status(struct backlight_device *bd)
 
        set_brightness(samsung, bd->props.brightness);
 
-       if (bd->props.power == FB_BLANK_UNBLANK)
+       if (bd->props.power == BACKLIGHT_POWER_ON)
                sabi_set_commandb(samsung, commands->set_backlight, 1);
        else
                sabi_set_commandb(samsung, commands->set_backlight, 0);
@@ -1189,7 +1188,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung)
 
        samsung->backlight_device = bd;
        samsung->backlight_device->props.brightness = read_brightness(samsung);
-       samsung->backlight_device->props.power = FB_BLANK_UNBLANK;
+       samsung->backlight_device->props.power = BACKLIGHT_POWER_ON;
        backlight_update_status(samsung->backlight_device);
 
        return 0;