Skip to content

Commit

Permalink
Merge branch 'linux-next' of git://cavan.codon.org.uk/platform-driver…
Browse files Browse the repository at this point in the history
…s-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()
  • Loading branch information
Linus Torvalds committed Aug 22, 2013
2 parents 1f8b766 + 41c8bd1 commit 6a7492a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
16 changes: 0 additions & 16 deletions drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_ALS_QUERY 0x3
#define HPWMI_HARDWARE_QUERY 0x4
#define HPWMI_WIRELESS_QUERY 0x5
#define HPWMI_BIOS_QUERY 0x9
#define HPWMI_HOTKEY_QUERY 0xc
#define HPWMI_WIRELESS2_QUERY 0x1b
#define HPWMI_POSTCODEERROR_QUERY 0x2a
Expand Down Expand Up @@ -293,19 +292,6 @@ static int hp_wmi_tablet_state(void)
return (state & 0x4) ? 1 : 0;
}

static int hp_wmi_enable_hotkeys(void)
{
int ret;
int query = 0x6e;

ret = hp_wmi_perform_query(HPWMI_BIOS_QUERY, 1, &query, sizeof(query),
0);

if (ret)
return -EINVAL;
return 0;
}

static int hp_wmi_set_block(void *data, bool blocked)
{
enum hp_wmi_radio r = (enum hp_wmi_radio) data;
Expand Down Expand Up @@ -1009,8 +995,6 @@ static int __init hp_wmi_init(void)
err = hp_wmi_input_setup();
if (err)
return err;

hp_wmi_enable_hotkeys();
}

if (bios_capable) {
Expand Down
8 changes: 6 additions & 2 deletions drivers/platform/x86/sony-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -4320,7 +4323,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 */
Expand Down

0 comments on commit 6a7492a

Please sign in to comment.