Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252847
b: refs/heads/master
c: b5a4223
h: refs/heads/master
i:
  252845: c107463
  252843: a4a4add
  252839: 4cee52f
  252831: 9c4217c
v: v3
  • Loading branch information
Joe Perches authored and Matthew Garrett committed May 27, 2011
1 parent 18e1531 commit 2c343d7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 611f5763fd0e38f896aa38346d4bc3f5c388b608
refs/heads/master: b5a4223c1ce5edbaae3db9494de8dcb2d08a755b
43 changes: 17 additions & 26 deletions trunk/drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -54,9 +56,6 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
#define HPWMI_HOTKEY_QUERY 0xc
#define HPWMI_WIRELESS2_QUERY 0x1b

#define PREFIX "HP WMI: "
#define UNIMP "Unimplemented "

enum hp_wmi_radio {
HPWMI_WIFI = 0,
HPWMI_BLUETOOTH = 1,
Expand Down Expand Up @@ -228,9 +227,8 @@ static int hp_wmi_perform_query(int query, int write, void *buffer,

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);
pr_warn("query 0x%x returned error 0x%x\n",
query, bios_return->return_code);
kfree(obj);
return bios_return->return_code;
}
Expand Down Expand Up @@ -384,8 +382,7 @@ static int hp_wmi_rfkill2_refresh(void)

if (num >= state.count ||
devstate->rfkill_id != rfkill2[i].id) {
printk(KERN_WARNING PREFIX "power configuration of "
"the wireless devices unexpectedly changed\n");
pr_warn("power configuration of the wireless devices unexpectedly changed\n");
continue;
}

Expand Down Expand Up @@ -471,7 +468,7 @@ static void hp_wmi_notify(u32 value, void *context)

status = wmi_get_event_data(value, &response);
if (status != AE_OK) {
printk(KERN_INFO PREFIX "bad event status 0x%x\n", status);
pr_info("bad event status 0x%x\n", status);
return;
}

Expand All @@ -480,8 +477,7 @@ static void hp_wmi_notify(u32 value, void *context)
if (!obj)
return;
if (obj->type != ACPI_TYPE_BUFFER) {
printk(KERN_INFO "hp-wmi: Unknown response received %d\n",
obj->type);
pr_info("Unknown response received %d\n", obj->type);
kfree(obj);
return;
}
Expand All @@ -498,8 +494,7 @@ static void hp_wmi_notify(u32 value, void *context)
event_id = *location;
event_data = *(location + 2);
} else {
printk(KERN_INFO "hp-wmi: Unknown buffer length %d\n",
obj->buffer.length);
pr_info("Unknown buffer length %d\n", obj->buffer.length);
kfree(obj);
return;
}
Expand Down Expand Up @@ -527,8 +522,7 @@ static void hp_wmi_notify(u32 value, void *context)

if (!sparse_keymap_report_event(hp_wmi_input_dev,
key_code, 1, true))
printk(KERN_INFO PREFIX "Unknown key code - 0x%x\n",
key_code);
pr_info("Unknown key code - 0x%x\n", key_code);
break;
case HPWMI_WIRELESS:
if (rfkill2_count) {
Expand All @@ -550,14 +544,12 @@ static void hp_wmi_notify(u32 value, void *context)
hp_wmi_get_hw_state(HPWMI_WWAN));
break;
case HPWMI_CPU_BATTERY_THROTTLE:
printk(KERN_INFO PREFIX UNIMP "CPU throttle because of 3 Cell"
" battery event detected\n");
pr_info("Unimplemented CPU throttle because of 3 Cell battery event detected\n");
break;
case HPWMI_LOCK_SWITCH:
break;
default:
printk(KERN_INFO PREFIX "Unknown event_id - %d - 0x%x\n",
event_id, event_data);
pr_info("Unknown event_id - %d - 0x%x\n", event_id, event_data);
break;
}
}
Expand Down Expand Up @@ -705,7 +697,7 @@ static int __devinit hp_wmi_rfkill2_setup(struct platform_device *device)
return err;

if (state.count > HPWMI_MAX_RFKILL2_DEVICES) {
printk(KERN_WARNING PREFIX "unable to parse 0x1b query output\n");
pr_warn("unable to parse 0x1b query output\n");
return -EINVAL;
}

Expand All @@ -727,14 +719,14 @@ static int __devinit hp_wmi_rfkill2_setup(struct platform_device *device)
name = "hp-wwan";
break;
default:
printk(KERN_WARNING PREFIX "unknown device type 0x%x\n",
state.device[i].radio_type);
pr_warn("unknown device type 0x%x\n",
state.device[i].radio_type);
continue;
}

if (!state.device[i].vendor_id) {
printk(KERN_WARNING PREFIX "zero device %d while %d "
"reported\n", i, state.count);
pr_warn("zero device %d while %d reported\n",
i, state.count);
continue;
}

Expand All @@ -755,8 +747,7 @@ static int __devinit hp_wmi_rfkill2_setup(struct platform_device *device)
IS_HWBLOCKED(state.device[i].power));

if (!(state.device[i].power & HPWMI_POWER_BIOS))
printk(KERN_INFO PREFIX "device %s blocked by BIOS\n",
name);
pr_info("device %s blocked by BIOS\n", name);

err = rfkill_register(rfkill);
if (err) {
Expand Down

0 comments on commit 2c343d7

Please sign in to comment.