button.c (e37c83c06c2690157a989df40dc99a6b61c9ea15) button.c (cb1cb1780f2025a7d612de09131bf6530f80fb1a)
1/*
2 * button.c - ACPI Button Driver
3 *
4 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
6 *
7 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 *

--- 411 unchanged lines hidden (view full) ---

420 */
421 lid_device = device;
422 }
423
424 if (device->wakeup.flags.valid) {
425 /* Button's GPE is run-wake GPE */
426 acpi_enable_gpe(device->wakeup.gpe_device,
427 device->wakeup.gpe_number,
1/*
2 * button.c - ACPI Button Driver
3 *
4 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
6 *
7 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 *

--- 411 unchanged lines hidden (view full) ---

420 */
421 lid_device = device;
422 }
423
424 if (device->wakeup.flags.valid) {
425 /* Button's GPE is run-wake GPE */
426 acpi_enable_gpe(device->wakeup.gpe_device,
427 device->wakeup.gpe_number,
428 ACPI_GPE_TYPE_WAKE_RUN);
428 ACPI_GPE_TYPE_RUNTIME);
429 device->wakeup.run_wake_count++;
430 device->wakeup.state.enabled = 1;
431 }
432
433 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
434 return 0;
435
436 err_remove_fs:

--- 7 unchanged lines hidden (view full) ---

444
445static int acpi_button_remove(struct acpi_device *device, int type)
446{
447 struct acpi_button *button = acpi_driver_data(device);
448
449 if (device->wakeup.flags.valid) {
450 acpi_disable_gpe(device->wakeup.gpe_device,
451 device->wakeup.gpe_number,
429 device->wakeup.run_wake_count++;
430 device->wakeup.state.enabled = 1;
431 }
432
433 printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device));
434 return 0;
435
436 err_remove_fs:

--- 7 unchanged lines hidden (view full) ---

444
445static int acpi_button_remove(struct acpi_device *device, int type)
446{
447 struct acpi_button *button = acpi_driver_data(device);
448
449 if (device->wakeup.flags.valid) {
450 acpi_disable_gpe(device->wakeup.gpe_device,
451 device->wakeup.gpe_number,
452 ACPI_GPE_TYPE_WAKE_RUN);
452 ACPI_GPE_TYPE_RUNTIME);
453 device->wakeup.run_wake_count--;
454 device->wakeup.state.enabled = 0;
455 }
456
457 acpi_button_remove_fs(device);
458 input_unregister_device(button->input);
459 kfree(button);
460 return 0;

--- 34 unchanged lines hidden ---
453 device->wakeup.run_wake_count--;
454 device->wakeup.state.enabled = 0;
455 }
456
457 acpi_button_remove_fs(device);
458 input_unregister_device(button->input);
459 kfree(button);
460 return 0;

--- 34 unchanged lines hidden ---