Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202460
b: refs/heads/master
c: b096667
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Renninger authored and Matthew Garrett committed Aug 3, 2010
1 parent 65fe714 commit f3c118b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: ae42f234470662aefe65ab59a0ef228f1f6f9c77
refs/heads/master: b096667bc3f01e2468df56d4a241dc5231b2f2aa
9 changes: 7 additions & 2 deletions trunk/drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,10 @@ static int hp_wmi_resume_handler(struct device *device)
static int __init hp_wmi_init(void)
{
int err;
int event_capable = wmi_has_guid(HPWMI_EVENT_GUID);
int bios_capable = wmi_has_guid(HPWMI_BIOS_GUID);

if (wmi_has_guid(HPWMI_EVENT_GUID)) {
if (event_capable) {
err = wmi_install_notify_handler(HPWMI_EVENT_GUID,
hp_wmi_notify, NULL);
if (ACPI_FAILURE(err))
Expand All @@ -724,7 +726,7 @@ static int __init hp_wmi_init(void)
}
}

if (wmi_has_guid(HPWMI_BIOS_GUID)) {
if (bios_capable) {
err = platform_driver_register(&hp_wmi_driver);
if (err)
goto err_driver_reg;
Expand All @@ -738,6 +740,9 @@ static int __init hp_wmi_init(void)
goto err_device_add;
}

if (!bios_capable && !event_capable)
return -ENODEV;

return 0;

err_device_add:
Expand Down

0 comments on commit f3c118b

Please sign in to comment.