lkml.org 
[lkml]   [2016]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] toshiba_acpi: Fix the kbd_backlight_mode_show printed value
Date
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.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
---
drivers/platform/x86/toshiba_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 254a4d5..444f351 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -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);

--
2.9.2
\
 
 \ /
  Last update: 2016-09-17 09:57    [W:1.058 / U:3.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site