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 <[email protected]>
Date: Sun, 26 May 2013 19:16:18 -0400
Subject: [PATCH] Fix reporting of sony-laptop gfx_switch_status.

Signed-off-by: Daniel Serpell <[email protected]>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to