{
struct acpi_button *button = seq->private;
- if (!button || !button->device)
- return 0;
-
seq_printf(seq, "type: %s\n",
acpi_device_name(button->device));
return 0;
acpi_status status;
unsigned long long state;
- if (!button || !button->device)
- return 0;
-
status = acpi_evaluate_integer(button->device->handle, "_LID", NULL, &state);
seq_printf(seq, "state: %s\n",
ACPI_FAILURE(status) ? "unsupported" :
struct proc_dir_entry *entry = NULL;
struct acpi_button *button;
- if (!device || !acpi_driver_data(device))
- return -EINVAL;
-
button = acpi_driver_data(device);
switch (button->type) {
struct acpi_button *button = acpi_driver_data(device);
struct input_dev *input;
- if (!button || !button->device)
- return;
-
switch (event) {
case ACPI_FIXED_HARDWARE_EVENT:
event = ACPI_BUTTON_NOTIFY_STATUS;
{
struct acpi_button *button;
- if (!device)
- return -EINVAL;
button = acpi_driver_data(device);
- if (button && button->type == ACPI_BUTTON_TYPE_LID)
+ if (button->type == ACPI_BUTTON_TYPE_LID)
return acpi_lid_send_state(button);
return 0;
}
struct acpi_button *button;
struct input_dev *input;
- if (!device)
- return -EINVAL;
-
button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL);
if (!button)
return -ENOMEM;
{
struct acpi_button *button;
- if (!device || !acpi_driver_data(device))
- return -EINVAL;
-
button = acpi_driver_data(device);
acpi_button_remove_fs(device);