X86 platform drivers
 help / color / mirror / Atom feed
From: Mattia Dongili <malattia@linux.it>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: platform-driver-x86@vger.kernel.org,
	Daniel Serpell <daniel.serpell@gmail.com>,
	Mattia Dongili <malattia@linux.it>
Subject: [PATCH 2/2] sony-laptop: Fix reporting of gfx_switch_status
Date: Sat, 10 Aug 2013 13:11:19 +0900	[thread overview]
Message-ID: <1376107879-22608-3-git-send-email-malattia@linux.it> (raw)
In-Reply-To: <1376107879-22608-1-git-send-email-malattia@linux.it>
In-Reply-To: <20130710212017.GA24522@kamineko.org>

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.8.4.rc1

      parent reply	other threads:[~2013-08-10  4:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 19:44 [GIT] x86 platform driver updates for 3.11 Matthew Garrett
2013-07-10 21:20 ` Mattia Dongili
2013-08-10  4:11   ` [PATCH 0/2] Fixes for sony-laptop " Mattia Dongili
2013-08-10  4:19     ` Matthew Garrett
2013-08-10  4:11   ` [PATCH 1/2] sony-laptop: return a negative error code in sonypi_compat_init() Mattia Dongili
2013-08-10  4:11   ` 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=1376107879-22608-3-git-send-email-malattia@linux.it \
    --to=malattia@linux.it \
    --cc=daniel.serpell@gmail.com \
    --cc=mjg59@srcf.ucam.org \
    --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