Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202447
b: refs/heads/master
c: 1c79632
h: refs/heads/master
i:
  202445: c0af346
  202443: 27405a3
  202439: 8349217
  202431: ac3e125
v: v3
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Aug 3, 2010
1 parent 5002705 commit d9b9548
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 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: e9ec7f3539cbeae8ffc5d7b30543e5612df5cba3
refs/heads/master: 1c79632bd011de84f32dcdf7d92b65bb61b1e6da
27 changes: 22 additions & 5 deletions trunk/drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,31 +1327,48 @@ static int __init acer_wmi_init(void)
"generic video driver\n");
}

if (platform_driver_register(&acer_platform_driver)) {
err = platform_driver_register(&acer_platform_driver);
if (err) {
printk(ACER_ERR "Unable to register platform driver.\n");
goto error_platform_register;
}

acer_platform_device = platform_device_alloc("acer-wmi", -1);
platform_device_add(acer_platform_device);
if (!acer_platform_device) {
err = -ENOMEM;
goto error_device_alloc;
}

err = platform_device_add(acer_platform_device);
if (err)
goto error_device_add;

err = create_sysfs();
if (err)
return err;
goto error_create_sys;

if (wmi_has_guid(WMID_GUID2)) {
interface->debug.wmid_devices = get_wmid_devices();
err = create_debugfs();
if (err)
return err;
goto error_create_debugfs;
}

/* Override any initial settings with values from the commandline */
acer_commandline_init();

return 0;

error_create_debugfs:
remove_sysfs(acer_platform_device);
error_create_sys:
platform_device_del(acer_platform_device);
error_device_add:
platform_device_put(acer_platform_device);
error_device_alloc:
platform_driver_unregister(&acer_platform_driver);
error_platform_register:
return -ENODEV;
return err;
}

static void __exit acer_wmi_exit(void)
Expand Down

0 comments on commit d9b9548

Please sign in to comment.