X86 platform drivers
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: Matthew Garrett <matthew.garrett@nebula.com>
Cc: platform-driver-x86@vger.kernel.org,
	Daniel Serpell <daniel.serpell@gmail.com>,
	Mattia Dongili <malattia@linux.it>
Subject: [PATCH 2/2] Fix reporting of sony-laptop gfx_switch_status.
Date: Wed, 29 May 2013 06:55:33 +0900	[thread overview]
Message-ID: <1369778133-24015-3-git-send-email-malattia@linux.it> (raw)
In-Reply-To: <1369778133-24015-1-git-send-email-malattia@linux.it>

From: Daniel Serpell <daniel.serpell@gmail.com>

Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com>
Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 drivers/platform/x86/sony-laptop.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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,
-- 
1.7.10.4

      parent reply	other threads:[~2013-05-28 22:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-28 21:55 [PATCH 0/2] sony-laptop fixes for 3.10 Mattia Dongili
2013-05-28 21:55 ` [PATCH 1/2] Fix to return a negative error code in the sonypi_compat_init() Mattia Dongili
2013-05-28 21:55 ` Mattia Dongili [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369778133-24015-3-git-send-email-malattia@linux.it \
    --to=malattia@linux.it \
    --cc=daniel.serpell@gmail.com \
    --cc=matthew.garrett@nebula.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox