diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-22 16:04:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-22 16:04:11 -0400 |
commit | 6a7492a4b2e05051a44458d7187023e22d580666 (patch) | |
tree | 69ae9f3065871611a1ce798682516b6542d3f0e5 | |
parent | 1f8b76656be831d1c6239bd36ef988d5b185b5ab (diff) | |
parent | 41c8bd1c75ef8e8566eca6b1c7bc273bc282f495 (diff) |
Merge branch 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86
Pull x86 platform driver fixes from Matthew Garrett:
"Three trivial fixes - the first reverts a patch that's broken some
other devices (again - I'm trying to figure out a clean way to
implement this), the other two fix minor issues in the sony-laptop
driver"
* 'linux-next' of git://cavan.codon.org.uk/platform-drivers-x86:
Revert "hp-wmi: Enable hotkeys on some systems"
sony-laptop: Fix reporting of gfx_switch_status
sony-laptop: return a negative error code in sonypi_compat_init()
-rw-r--r-- | drivers/platform/x86/hp-wmi.c | 16 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 8 |
2 files changed, 6 insertions, 18 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 97bb05edcb5a..d6970f47ae72 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c | |||
@@ -53,7 +53,6 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); | |||
53 | #define HPWMI_ALS_QUERY 0x3 | 53 | #define HPWMI_ALS_QUERY 0x3 |
54 | #define HPWMI_HARDWARE_QUERY 0x4 | 54 | #define HPWMI_HARDWARE_QUERY 0x4 |
55 | #define HPWMI_WIRELESS_QUERY 0x5 | 55 | #define HPWMI_WIRELESS_QUERY 0x5 |
56 | #define HPWMI_BIOS_QUERY 0x9 | ||
57 | #define HPWMI_HOTKEY_QUERY 0xc | 56 | #define HPWMI_HOTKEY_QUERY 0xc |
58 | #define HPWMI_WIRELESS2_QUERY 0x1b | 57 | #define HPWMI_WIRELESS2_QUERY 0x1b |
59 | #define HPWMI_POSTCODEERROR_QUERY 0x2a | 58 | #define HPWMI_POSTCODEERROR_QUERY 0x2a |
@@ -293,19 +292,6 @@ static int hp_wmi_tablet_state(void) | |||
293 | return (state & 0x4) ? 1 : 0; | 292 | return (state & 0x4) ? 1 : 0; |
294 | } | 293 | } |
295 | 294 | ||
296 | static int hp_wmi_enable_hotkeys(void) | ||
297 | { | ||
298 | int ret; | ||
299 | int query = 0x6e; | ||
300 | |||
301 | ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &query, sizeof(query), | ||
302 | 0); | ||
303 | |||
304 | if (ret) | ||
305 | return -EINVAL; | ||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | static int hp_wmi_set_block(void *data, bool blocked) | 295 | static int hp_wmi_set_block(void *data, bool blocked) |
310 | { | 296 | { |
311 | enum hp_wmi_radio r = (enum hp_wmi_radio) data; | 297 | enum hp_wmi_radio r = (enum hp_wmi_radio) data; |
@@ -1009,8 +995,6 @@ static int __init hp_wmi_init(void) | |||
1009 | err = hp_wmi_input_setup(); | 995 | err = hp_wmi_input_setup(); |
1010 | if (err) | 996 | if (err) |
1011 | return err; | 997 | return err; |
1012 | |||
1013 | hp_wmi_enable_hotkeys(); | ||
1014 | } | 998 | } |
1015 | 999 | ||
1016 | if (bios_capable) { | 1000 | if (bios_capable) { |
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 | ||
2446 | static int sony_nc_gfx_switch_setup(struct platform_device *pd, | 2449 | static 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 */ |