Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144127
b: refs/heads/master
c: 1bce811
h: refs/heads/master
i:
  144125: 42e3d97
  144123: 53a4fa5
  144119: 59083e1
  144111: 5e17d72
  144095: f70baad
  144063: ba6c076
  143999: 0dea0a9
  143871: f9d9a86
v: v3
  • Loading branch information
Bjorn Helgaas authored and Len Brown committed Apr 11, 2009
1 parent 68625c0 commit 5611be4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: e2fb9754d27513918a4936e8cbaad50ff56cfd3d
refs/heads/master: 1bce81131c71064bc3163078f24545b839a31967
13 changes: 4 additions & 9 deletions trunk/drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ static struct proc_dir_entry *acpi_lid_dir;

static int acpi_button_add_fs(struct acpi_device *device)
{
struct acpi_button *button = acpi_driver_data(device);
struct proc_dir_entry *entry = NULL;
struct acpi_button *button;

button = acpi_driver_data(device);

switch (button->type) {
case ACPI_BUTTON_TYPE_POWER:
Expand Down Expand Up @@ -291,19 +289,18 @@ static void acpi_button_notify(struct acpi_device *device, u32 event)

static int acpi_button_resume(struct acpi_device *device)
{
struct acpi_button *button;
struct acpi_button *button = acpi_driver_data(device);

button = acpi_driver_data(device);
if (button->type == ACPI_BUTTON_TYPE_LID)
return acpi_lid_send_state(button);
return 0;
}

static int acpi_button_add(struct acpi_device *device)
{
int error;
struct acpi_button *button;
struct input_dev *input;
int error;

button = kzalloc(sizeof(struct acpi_button), GFP_KERNEL);
if (!button)
Expand Down Expand Up @@ -419,9 +416,7 @@ static int acpi_button_add(struct acpi_device *device)

static int acpi_button_remove(struct acpi_device *device, int type)
{
struct acpi_button *button;

button = acpi_driver_data(device);
struct acpi_button *button = acpi_driver_data(device);

acpi_button_remove_fs(device);
input_unregister_device(button->input);
Expand Down

0 comments on commit 5611be4

Please sign in to comment.