All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] sony-laptop fixes for 3.10
@ 2013-05-28 21:55 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 ` [PATCH 2/2] Fix reporting of sony-laptop gfx_switch_status Mattia Dongili
  0 siblings, 2 replies; 3+ messages in thread
From: Mattia Dongili @ 2013-05-28 21:55 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: platform-driver-x86, Mattia Dongili

Hi Matthew,
a couple of small fixes for sony-laptop, one for a bug in reporting the
gfx_switch status, the other is a minor fix for returning meaningful values on
error path in sonypi_compat_init.

Daniel Serpell (1):
  Fix reporting of sony-laptop gfx_switch_status.

Wei Yongjun (1):
  Fix to return a negative error code in the sonypi_compat_init()

 drivers/platform/x86/sony-laptop.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] Fix to return a negative error code in the sonypi_compat_init()
  2013-05-28 21:55 [PATCH 0/2] sony-laptop fixes for 3.10 Mattia Dongili
@ 2013-05-28 21:55 ` Mattia Dongili
  2013-05-28 21:55 ` [PATCH 2/2] Fix reporting of sony-laptop gfx_switch_status Mattia Dongili
  1 sibling, 0 replies; 3+ messages in thread
From: Mattia Dongili @ 2013-05-28 21:55 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: platform-driver-x86, Wei Yongjun, Mattia Dongili

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Return -1 in the error handling case instead of 0, as done elsewhere in
this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mattia Dongili <malattia@linux.it>
---
 drivers/platform/x86/sony-laptop.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 2ac045f..b162733 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -4320,7 +4320,8 @@ static int sony_pic_add(struct acpi_device *device)
 		goto err_free_resources;
 	}
 
-	if (sonypi_compat_init())
+	result = sonypi_compat_init();
+	if (result)
 		goto err_remove_input;
 
 	/* request io port */
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] Fix reporting of sony-laptop gfx_switch_status.
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Mattia Dongili @ 2013-05-28 21:55 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: platform-driver-x86, Daniel Serpell, Mattia Dongili

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-05-28 22:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] Fix reporting of sony-laptop gfx_switch_status Mattia Dongili

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.