Skip to contentSkip to conversation

arch: powerpc: Use backlight power constants

PATCH Applied Thomas Zimmermann 2 participants 4 messages Jul 31, 2024 – Aug 12, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arch: powerpc: Use backlight power constants

Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states") introduced dedicated constants for backlight power states. Convert PowerPC code to the new constants.

The new constants replace the fbdev constants. This is part of a larger effort to make kernel subsystems more independent from fbdev code and headers.

Thomas Zimmermann (2):
arch: powerpc: Use backlight power constants
macintosh/pmubl: Use backlight power constants

 arch/powerpc/kernel/traps.c           | 2 +-
 drivers/macintosh/via-pmu-backlight.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.45.2
#1 lore raw

PATCH 1/2 arch: powerpc: 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.

---
 arch/powerpc/kernel/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/kernel/traps.c +1 -1
index 28d6472c380a..edf5cabe5dfd 100644
@@ -121,7 +121,7 @@ static void pmac_backlight_unblank(void)
 
 		props = &pmac_backlight->props;
 		props->brightness = props->max_brightness;
-		props->power = FB_BLANK_UNBLANK;
+		props->power = BACKLIGHT_POWER_ON;
 		backlight_update_status(pmac_backlight);
 	}
 	mutex_unlock(&pmac_backlight_mutex);
Signature · 1 line
2.45.2
#2 lore raw

PATCH 2/2 macintosh/pmubl: Use backlight power constants

In reply to Thomas Zimmermann

Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics.

---
 drivers/macintosh/via-pmu-backlight.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/macintosh/via-pmu-backlight.c +1 -1
index 89450645c230..26bd9ed5e664 100644
@@ -178,7 +178,7 @@ void __init pmu_backlight_init(void)
 	}
 
 	bd->props.brightness = level;
-	bd->props.power = FB_BLANK_UNBLANK;
+	bd->props.power = BACKLIGHT_POWER_ON;
 	backlight_update_status(bd);
 
 	printk(KERN_INFO "PMU Backlight initialized (%s)\n", name);
Signature · 1 line
2.45.2
#3 lore raw
In reply to Thomas Zimmermann
Quoted 9 lines · Thomas Zimmermann

Commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states") introduced dedicated constants for backlight power states. Convert PowerPC code to the new constants.

The new constants replace the fbdev constants. This is part of a larger effort to make kernel subsystems more independent from fbdev code and headers.

[...]

Applied to powerpc/next.

[1/2] arch: powerpc: Use backlight power constants

      https://git.kernel.org/powerpc/c/28455894bb99a1afe541cb7c987cc7e193c41fc6
[2/2] macintosh/pmubl: Use backlight power constants
      https://git.kernel.org/powerpc/c/c7907a47bb68a18758edf12fd45e201ff03e2acc

cheers