diff options
author | Daniel Serpell <daniel.serpell@gmail.com> | 2013-08-10 13:11:19 +0900 |
---|---|---|
committer | Matthew Garrett <matthew.garrett@nebula.com> | 2013-08-18 13:23:09 -0400 |
commit | 0b8cb621fb26404c62486c91fa54d13e47fe68fa (patch) | |
tree | e9155b799499535d905996481bd01ec65817f3c6 /drivers/platform/x86/sony-laptop.c | |
parent | 03a174b35cb6064cd670428f8ea811fc2736a3a6 (diff) | |
download | op-kernel-dev-0b8cb621fb26404c62486c91fa54d13e47fe68fa.zip op-kernel-dev-0b8cb621fb26404c62486c91fa54d13e47fe68fa.tar.gz |
sony-laptop: Fix reporting of gfx_switch_status
Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Diffstat (limited to 'drivers/platform/x86/sony-laptop.c')
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index b162733..3a1b6bf 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -2440,7 +2440,10 @@ static ssize_t sony_nc_gfx_switch_status_show(struct device *dev, if (pos < 0) return pos; - return snprintf(buffer, PAGE_SIZE, "%s\n", pos ? "speed" : "stamina"); + return snprintf(buffer, PAGE_SIZE, "%s\n", + pos == SPEED ? "speed" : + pos == STAMINA ? "stamina" : + pos == AUTO ? "auto" : "unknown"); } static int sony_nc_gfx_switch_setup(struct platform_device *pd, |