Skip to contentSkip to conversation

toshiba_acpi: Fix the kbd_backlight_mode_show printed value

PATCH In review Azael Avalos 2 participants 2 messages Aug 16, 2016 – Aug 28, 2016

Subsystems (2)
lore
Share & tools
lore

Azael Avalos

author maintainer
#0 lore raw

PATCH 1/1 toshiba_acpi: Fix the kbd_backlight_mode_show printed value

The mentioned function prints the value in decimal, but the documentation and its parent function available_kbd_modes_show are showing the value as hexadecimal.

This patch simply changes the value printed from decimal to hex, as stated in the documentation and the parent function.

---
 drivers/platform/x86/toshiba_acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/toshiba_acpi.c +1 -1
index 254a4d5..444f351 100644
@@ -1873,7 +1873,7 @@ static ssize_t kbd_backlight_mode_show(struct device *dev,
 	if (toshiba_kbd_illum_status_get(toshiba, &time) < 0)
 		return -EIO;
 
-	return sprintf(buf, "%i\n", time & SCI_KBD_MODE_MASK);
+	return sprintf(buf, "0x%x\n", time & SCI_KBD_MODE_MASK);
 }
 static DEVICE_ATTR_RW(kbd_backlight_mode);
 
Signature · 1 line
2.9.2
#1 lore raw
Quoted 8 lines · Azael Avalos

The mentioned function prints the value in decimal, but the documentation and its parent function available_kbd_modes_show are showing the value as hexadecimal.

This patch simply changes the value printed from decimal to hex, as stated in the documentation and the parent function.

Thanks, Queued to for-next.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center