diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-24 16:00:02 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-24 16:00:02 -0500 |
| commit | 71492fd1bdd4734d8efd20fe00ebf31027d86d3c (patch) | |
| tree | d98ce4131c47f0027dded482d25528b9a57f44ac /drivers/platform/x86/dell-wmi.c | |
| parent | 45e62974fb110da926e2a6c5b357c15639bdc233 (diff) | |
| parent | fcb11235d3910c39afece52f6e106a9ca565d34b (diff) | |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (34 commits)
classmate-laptop: add support for Classmate PC ACPI devices
hp-wmi: Fix two memleaks
acer-wmi, msi-wmi: Remove needless DMI MODULE_ALIAS
dell-wmi: do not keep driver loaded on unsupported boxes
wmi: Free the allocated acpi objects through wmi_get_event_data
drivers/platform/x86/acerhdf.c: check BIOS information whether it begins with string of table
acerhdf: add new BIOS versions
acerhdf: limit modalias matching to supported
toshiba_acpi: convert to seq_file
asus_acpi: convert to seq_file
ACPI: do not select ACPI_DOCK from ATA_ACPI
sony-laptop: enumerate rfkill devices using SN06
sony-laptop: rfkill support for newer models
ACPI: fix OSC regression that caused aer and pciehp not to load
MAINTAINERS: add maintainer for msi-wmi driver
fujitu-laptop: fix tests of acpi_evaluate_integer() return value
arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c: avoid cross-CPU interrupts by using smp_call_function_any()
ACPI: processor: remove _PDC object list from struct acpi_processor
ACPI: processor: change acpi_processor_set_pdc() interface
ACPI: processor: open code acpi_processor_cleanup_pdc
...
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
| -rw-r--r-- | drivers/platform/x86/dell-wmi.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 67f3fe71c509..916ccb2b316c 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c | |||
| @@ -238,6 +238,7 @@ static void dell_wmi_notify(u32 value, void *context) | |||
| 238 | input_sync(dell_wmi_input_dev); | 238 | input_sync(dell_wmi_input_dev); |
| 239 | } | 239 | } |
| 240 | } | 240 | } |
| 241 | kfree(obj); | ||
| 241 | } | 242 | } |
| 242 | 243 | ||
| 243 | 244 | ||
| @@ -324,37 +325,34 @@ static int __init dell_wmi_init(void) | |||
| 324 | int err; | 325 | int err; |
| 325 | 326 | ||
| 326 | if (wmi_has_guid(DELL_EVENT_GUID)) { | 327 | if (wmi_has_guid(DELL_EVENT_GUID)) { |
| 328 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); | ||
| 329 | return -ENODEV; | ||
| 330 | } | ||
| 327 | 331 | ||
| 328 | dmi_walk(find_hk_type, NULL); | 332 | dmi_walk(find_hk_type, NULL); |
| 329 | 333 | acpi_video = acpi_video_backlight_support(); | |
| 330 | err = dell_wmi_input_setup(); | ||
| 331 | |||
| 332 | if (err) | ||
| 333 | return err; | ||
| 334 | |||
| 335 | err = wmi_install_notify_handler(DELL_EVENT_GUID, | ||
| 336 | dell_wmi_notify, NULL); | ||
| 337 | if (err) { | ||
| 338 | input_unregister_device(dell_wmi_input_dev); | ||
| 339 | printk(KERN_ERR "dell-wmi: Unable to register" | ||
| 340 | " notify handler - %d\n", err); | ||
| 341 | return err; | ||
| 342 | } | ||
| 343 | 334 | ||
| 344 | acpi_video = acpi_video_backlight_support(); | 335 | err = dell_wmi_input_setup(); |
| 336 | if (err) | ||
| 337 | return err; | ||
| 345 | 338 | ||
| 346 | } else | 339 | err = wmi_install_notify_handler(DELL_EVENT_GUID, |
| 347 | printk(KERN_WARNING "dell-wmi: No known WMI GUID found\n"); | 340 | dell_wmi_notify, NULL); |
| 341 | if (err) { | ||
| 342 | input_unregister_device(dell_wmi_input_dev); | ||
| 343 | printk(KERN_ERR | ||
| 344 | "dell-wmi: Unable to register notify handler - %d\n", | ||
| 345 | err); | ||
| 346 | return err; | ||
| 347 | } | ||
| 348 | 348 | ||
| 349 | return 0; | 349 | return 0; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | static void __exit dell_wmi_exit(void) | 352 | static void __exit dell_wmi_exit(void) |
| 353 | { | 353 | { |
| 354 | if (wmi_has_guid(DELL_EVENT_GUID)) { | 354 | wmi_remove_notify_handler(DELL_EVENT_GUID); |
| 355 | wmi_remove_notify_handler(DELL_EVENT_GUID); | 355 | input_unregister_device(dell_wmi_input_dev); |
| 356 | input_unregister_device(dell_wmi_input_dev); | ||
| 357 | } | ||
| 358 | } | 356 | } |
| 359 | 357 | ||
| 360 | module_init(dell_wmi_init); | 358 | module_init(dell_wmi_init); |
