aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/sony-laptop.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86/sony-laptop.c')
-rw-r--r--drivers/platform/x86/sony-laptop.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index 2ac045f27f10..3a1b6bf326a8 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,
2440 if (pos < 0) 2440 if (pos < 0)
2441 return pos; 2441 return pos;
2442 2442
2443 return snprintf(buffer, PAGE_SIZE, "%s\n", pos ? "speed" : "stamina"); 2443 return snprintf(buffer, PAGE_SIZE, "%s\n",
2444 pos == SPEED ? "speed" :
2445 pos == STAMINA ? "stamina" :
2446 pos == AUTO ? "auto" : "unknown");
2444} 2447}
2445 2448
2446static int sony_nc_gfx_switch_setup(struct platform_device *pd, 2449static int sony_nc_gfx_switch_setup(struct platform_device *pd,
@@ -4320,7 +4323,8 @@ static int sony_pic_add(struct acpi_device *device)
4320 goto err_free_resources; 4323 goto err_free_resources;
4321 } 4324 }
4322 4325
4323 if (sonypi_compat_init()) 4326 result = sonypi_compat_init();
4327 if (result)
4324 goto err_remove_input; 4328 goto err_remove_input;
4325 4329
4326 /* request io port */ 4330 /* request io port */