Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202445
b: refs/heads/master
c: dfec5c4
h: refs/heads/master
i:
  202443: 27405a3
v: v3
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Aug 3, 2010
1 parent 2d888b3 commit c0af346
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 7 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: 35f2915c3bd0cd6950bdd9d461de565e8feae852
refs/heads/master: dfec5c48cdfdcb08d73d24cbf277de543ef864ae
31 changes: 25 additions & 6 deletions trunk/drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,23 +715,42 @@ static int __init hp_wmi_init(void)
if (wmi_has_guid(HPWMI_EVENT_GUID)) {
err = wmi_install_notify_handler(HPWMI_EVENT_GUID,
hp_wmi_notify, NULL);
if (ACPI_SUCCESS(err))
hp_wmi_input_setup();
if (ACPI_FAILURE(err))
return -EINVAL;
err = hp_wmi_input_setup();
if (err) {
wmi_remove_notify_handler(HPWMI_EVENT_GUID);
return err;
}
}

if (wmi_has_guid(HPWMI_BIOS_GUID)) {
err = platform_driver_register(&hp_wmi_driver);
if (err)
return 0;
goto err_driver_reg;
hp_wmi_platform_dev = platform_device_alloc("hp-wmi", -1);
if (!hp_wmi_platform_dev) {
platform_driver_unregister(&hp_wmi_driver);
return 0;
err = -ENOMEM;
goto err_device_alloc;
}
platform_device_add(hp_wmi_platform_dev);
err = platform_device_add(hp_wmi_platform_dev);
if (err)
goto err_device_add;
}

return 0;

err_device_add:
platform_device_put(hp_wmi_platform_dev);
err_device_alloc:
platform_driver_unregister(&hp_wmi_driver);
err_driver_reg:
if (wmi_has_guid(HPWMI_EVENT_GUID)) {
input_unregister_device(hp_wmi_input_dev);
wmi_remove_notify_handler(HPWMI_EVENT_GUID);
}

return err;
}

static void __exit hp_wmi_exit(void)
Expand Down

0 comments on commit c0af346

Please sign in to comment.