From: Daniel Serpell <daniel.serpell@gmail.com>
To: Mattia Dongili <malattia@linux.it>
Cc: Arthur Wirski <awirski@gmail.com>, platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] sony-laptop: Reading gfx_switch_status in SVS13A15GLB
Date: Sun, 26 May 2013 19:37:45 -0400 [thread overview]
Message-ID: <20130526233725.GA22177@daniel-vaio> (raw)
In-Reply-To: <20130526221607.GA9539@kamineko.org>
On Mon, May 27, 2013 at 07:16:07AM +0900, Mattia Dongili wrote:
> On Sat, May 25, 2013 at 08:12:43PM -0400, Daniel Serpell wrote:
> >
> > Attached is a patch to fix this.
>
> oh, nice. we've been reporting the opposite for all this time... And it
> looks like we're missing the AUTO value of the enum when setting the
> buffer.
> Mind adding that and resending the patch (as inline attachment)?
>
Ok, I'm not sure what is the preferred style, but here is the new patch.
I can't test the "AUTO" setting, as this laptop has only two positions.
Thanks,
Daniel.
From: Daniel Serpell <daniel.serpell@gmail.com>
Date: Sun, 26 May 2013 19:16:18 -0400
Subject: [PATCH] Fix reporting of sony-laptop gfx_switch_status.
Signed-off-by: Daniel Serpell <daniel.serpell@gmail.com>
---
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 a10a376..3503d9c 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.1.2
next prev parent reply other threads:[~2013-05-26 23:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-26 0:12 [PATCH] sony-laptop: Reading gfx_switch_status in SVS13A15GLB Daniel Serpell
2013-05-26 22:16 ` Mattia Dongili
2013-05-26 23:37 ` Daniel Serpell [this message]
2013-05-27 17:34 ` Arthur Wirski
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=20130526233725.GA22177@daniel-vaio \
--to=daniel.serpell@gmail.com \
--cc=awirski@gmail.com \
--cc=malattia@linux.it \
--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