Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 243092
b: refs/heads/master
c: 9af0e0f
h: refs/heads/master
v: v3
  • Loading branch information
Anssi Hannula authored and Matthew Garrett committed Mar 28, 2011
1 parent 31a26dc commit b5237fa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7751ab8e600f26e10c2ba12a92d48a4852a51da8
refs/heads/master: 9af0e0fb70ed8e2387323c19496a7e174363f7b6
16 changes: 16 additions & 0 deletions trunk/drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ struct bios_return {
u32 value;
};

enum hp_return_value {
HPWMI_RET_WRONG_SIGNATURE = 0x02,
HPWMI_RET_UNKNOWN_COMMAND = 0x03,
HPWMI_RET_UNKNOWN_CMDTYPE = 0x04,
HPWMI_RET_INVALID_PARAMETERS = 0x05,
};

static const struct key_entry hp_wmi_keymap[] = {
{ KE_KEY, 0x02, { KEY_BRIGHTNESSUP } },
{ KE_KEY, 0x03, { KEY_BRIGHTNESSDOWN } },
Expand Down Expand Up @@ -171,6 +178,15 @@ static int hp_wmi_perform_query(int query, int write, u32 *buffer,

bios_return = *((struct bios_return *)obj->buffer.pointer);

if (bios_return.return_code) {
if (bios_return.return_code != HPWMI_RET_UNKNOWN_CMDTYPE)
printk(KERN_WARNING PREFIX "query 0x%x returned "
"error 0x%x\n",
query, bios_return.return_code);
kfree(obj);
return bios_return.return_code;
}

memcpy(buffer, &bios_return.value, sizeof(bios_return.value));

kfree(obj);
Expand Down

0 comments on commit b5237fa

Please sign in to comment.