Skip to content

Commit

Permalink
sony-laptop: Fix reporting of gfx_switch_status
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Serpell authored and Matthew Garrett committed Aug 18, 2013
1 parent 03a174b commit 0b8cb62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0b8cb62

Please sign in to comment.