Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144126
b: refs/heads/master
c: e2fb975
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 11, 2009
1 parent 42e3d97 commit 68625c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 50a4da890102a455e5cd3dd358c38650d07178d3
refs/heads/master: e2fb9754d27513918a4936e8cbaad50ff56cfd3d
22 changes: 1 addition & 21 deletions trunk/drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
{
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;
Expand All @@ -147,9 +144,6 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
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" :
Expand All @@ -171,9 +165,6 @@ static int acpi_button_add_fs(struct acpi_device *device)
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) {
Expand Down Expand Up @@ -270,9 +261,6 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)
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;
Expand Down Expand Up @@ -305,10 +293,8 @@ static int acpi_button_resume(struct acpi_device *device)
{
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;
}
Expand All @@ -319,9 +305,6 @@ static int acpi_button_add(struct acpi_device *device)
struct acpi_button *button;
struct input_dev *input;

if (!device)
return -EINVAL;

button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL);
if (!button)
return -ENOMEM;
Expand Down Expand Up @@ -438,9 +421,6 @@ static int acpi_button_remove(struct acpi_device *device, int type)
{
struct acpi_button *button;

if (!device || !acpi_driver_data(device))
return -EINVAL;

button = acpi_driver_data(device);

acpi_button_remove_fs(device);
Expand Down

0 comments on commit 68625c0

Please sign in to comment.