proc 2/2: remove struct proc_dir_entry::owner
[safe/jmp/linux-2.6] / drivers / acpi / button.c
index baeb661..c2f0606 100644 (file)
@@ -33,7 +33,6 @@
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 
-#define ACPI_BUTTON_COMPONENT          0x00080000
 #define ACPI_BUTTON_CLASS              "button"
 #define ACPI_BUTTON_FILE_INFO          "info"
 #define ACPI_BUTTON_FILE_STATE         "state"
@@ -201,12 +200,10 @@ static int acpi_button_add_fs(struct acpi_device *device)
 
        if (!entry)
                return -ENODEV;
-       entry->owner = THIS_MODULE;
 
        acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry);
        if (!acpi_device_dir(device))
                return -ENODEV;
-       acpi_device_dir(device)->owner = THIS_MODULE;
 
        /* 'info' [R] */
        entry = proc_create_data(ACPI_BUTTON_FILE_INFO,
@@ -262,6 +259,7 @@ static int acpi_lid_send_state(struct acpi_button *button)
                return -ENODEV;
        /* input layer checks if event is redundant */
        input_report_switch(button->input, SW_LID, !state);
+       input_sync(button->input);
        return 0;
 }
 
@@ -285,8 +283,8 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
                        input_report_key(input, keycode, 1);
                        input_sync(input);
                        input_report_key(input, keycode, 0);
+                       input_sync(input);
                }
-               input_sync(input);
 
                acpi_bus_generate_proc_event(button->device, event,
                                        ++button->pushed);
@@ -384,7 +382,7 @@ static int acpi_button_add(struct acpi_device *device)
                return -ENOMEM;
 
        button->device = device;
-       acpi_driver_data(device) = button;
+       device->driver_data = button;
 
        button->input = input = input_allocate_device();
        if (!input) {
@@ -478,7 +476,7 @@ static int acpi_button_add(struct acpi_device *device)
                                  device->wakeup.gpe_number,
                                  ACPI_GPE_TYPE_WAKE_RUN);
                acpi_enable_gpe(device->wakeup.gpe_device,
-                               device->wakeup.gpe_number, ACPI_NOT_ISR);
+                               device->wakeup.gpe_number);
                device->wakeup.state.enabled = 1;
        }
 
@@ -522,7 +520,6 @@ static int __init acpi_button_init(void)
        acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir);
        if (!acpi_button_dir)
                return -ENODEV;
-       acpi_button_dir->owner = THIS_MODULE;
        result = acpi_bus_register_driver(&acpi_button_driver);
        if (result < 0) {
                remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);