Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312740
b: refs/heads/master
c: e579e2d
h: refs/heads/master
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 1, 2012
1 parent a32f101 commit 2bcda08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 1be532de834ab7b18ce20dc2e56e724770beb79d
refs/heads/master: e579e2dd8f056cfeaf4d2b313a35ddafb3c4e531
12 changes: 8 additions & 4 deletions trunk/drivers/acpi/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,23 +60,25 @@ ACPI_MODULE_NAME("power");

static int acpi_power_add(struct acpi_device *device);
static int acpi_power_remove(struct acpi_device *device, int type);
static int acpi_power_resume(struct acpi_device *device);

static const struct acpi_device_id power_device_ids[] = {
{ACPI_POWER_HID, 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, power_device_ids);

static int acpi_power_resume(struct device *dev);
static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume);

static struct acpi_driver acpi_power_driver = {
.name = "power",
.class = ACPI_POWER_CLASS,
.ids = power_device_ids,
.ops = {
.add = acpi_power_add,
.remove = acpi_power_remove,
.resume = acpi_power_resume,
},
.drv.pm = &acpi_power_pm,
};

/*
Expand Down Expand Up @@ -771,14 +773,16 @@ static int acpi_power_remove(struct acpi_device *device, int type)
return 0;
}

static int acpi_power_resume(struct acpi_device *device)
static int acpi_power_resume(struct device *dev)
{
int result = 0, state;
struct acpi_device *device;
struct acpi_power_resource *resource;

if (!device)
if (!dev)
return -EINVAL;

device = to_acpi_device(dev);
resource = acpi_driver_data(device);
if (!resource)
return -EINVAL;
Expand Down

0 comments on commit 2bcda08

Please sign in to comment.