From: Daniel Serpell Date: Sat, 10 Aug 2013 04:11:19 +0000 (+0900) Subject: sony-laptop: Fix reporting of gfx_switch_status X-Git-Tag: upstream/snapshot3+hdmi~4520^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b8cb621fb26404c62486c91fa54d13e47fe68fa;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git sony-laptop: Fix reporting of gfx_switch_status Signed-off-by: Daniel Serpell Signed-off-by: Mattia Dongili Signed-off-by: Matthew Garrett --- 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,