struct acpi_button {
struct acpi_device *adev;
- struct platform_device *pdev;
+ struct device *dev; /* physical button device */
unsigned int type;
struct input_dev *input;
char phys[32]; /* for input device */
return state;
if (state && signal_wakeup)
- acpi_pm_wakeup_event(&button->pdev->dev);
+ acpi_pm_wakeup_event(button->dev);
return acpi_lid_notify_state(button, state);
}
return;
}
- acpi_pm_wakeup_event(&button->pdev->dev);
+ acpi_pm_wakeup_event(button->dev);
if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE)
return;
platform_set_drvdata(pdev, button);
- button->pdev = pdev;
+ button->dev = &pdev->dev;
button->adev = device;
button->input = input = input_allocate_device();
if (!input) {
goto err_remove_fs;
}
- device_init_wakeup(&pdev->dev, true);
+ device_init_wakeup(button->dev, true);
switch (device->device_type) {
case ACPI_BUS_TYPE_POWER_BUTTON:
return 0;
err_input_unregister:
- device_init_wakeup(&pdev->dev, false);
+ device_init_wakeup(button->dev, false);
input_unregister_device(input);
err_remove_fs:
acpi_button_remove_fs(button);
}
acpi_os_wait_events_complete();
- device_init_wakeup(&pdev->dev, false);
+ device_init_wakeup(button->dev, false);
acpi_button_remove_fs(button);
input_unregister_device(button->input);