summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-07-19 00:03:35 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2012-07-19 00:03:35 +0200
commit6148d38b37ce9468cdf5a37ca49b4ac5c091e8fa (patch)
tree8a1dc43ac8bbed2b85d35670d883cd324600a9f1 /drivers/hwmon
parentd52fdf13377c25e7a5620c6bec406bbf6a46d443 (diff)
parent18468843fac331dfbb700901c8012d17373adfec (diff)
downloadop-kernel-dev-6148d38b37ce9468cdf5a37ca49b4ac5c091e8fa.zip
op-kernel-dev-6148d38b37ce9468cdf5a37ca49b4ac5c091e8fa.tar.gz
Merge branch 'pm-acpi'
* pm-acpi: (24 commits) olpc-xo15-sci: Use struct dev_pm_ops for power management ACPI / PM: Drop PM callbacks from the ACPI bus type ACPI / PM: Drop legacy driver PM callbacks that are not used any more ACPI / PM: Do not execute legacy driver PM callbacks acpi_power_meter: Use struct dev_pm_ops for power management fujitsu-tablet: Use struct dev_pm_ops for power management classmate-laptop: Use struct dev_pm_ops for power management xo15-ebook: Use struct dev_pm_ops for power management toshiba_bluetooth: Use struct dev_pm_ops for power management panasonic-laptop: Use struct dev_pm_ops for power management sony-laptop: Use struct dev_pm_ops for power management hp_accel: Use struct dev_pm_ops for power management toshiba_acpi: Use struct dev_pm_ops for power management ACPI: Use struct dev_pm_ops for power management in the SBS driver ACPI: Use struct dev_pm_ops for power management in the power driver ACPI: Use struct dev_pm_ops for power management in the button driver ACPI: Use struct dev_pm_ops for power management in the battery driver ACPI: Use struct dev_pm_ops for power management in the AC driver ACPI: Use struct dev_pm_ops for power management in processor driver ACPI: Use struct dev_pm_ops for power management in the thermal driver ...
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/acpi_power_meter.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 34ad5a2..e3fcf81 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -929,20 +929,25 @@ static int acpi_power_meter_remove(struct acpi_device *device, int type)
return 0;
}
-static int acpi_power_meter_resume(struct acpi_device *device)
+static int acpi_power_meter_resume(struct device *dev)
{
struct acpi_power_meter_resource *resource;
- if (!device || !acpi_driver_data(device))
+ if (!dev)
+ return -EINVAL;
+
+ resource = acpi_driver_data(to_acpi_device(dev));
+ if (!resource)
return -EINVAL;
- resource = acpi_driver_data(device);
free_capabilities(resource);
read_capabilities(resource);
return 0;
}
+static SIMPLE_DEV_PM_OPS(acpi_power_meter_pm, NULL, acpi_power_meter_resume);
+
static struct acpi_driver acpi_power_meter_driver = {
.name = "power_meter",
.class = ACPI_POWER_METER_CLASS,
@@ -950,9 +955,9 @@ static struct acpi_driver acpi_power_meter_driver = {
.ops = {
.add = acpi_power_meter_add,
.remove = acpi_power_meter_remove,
- .resume = acpi_power_meter_resume,
.notify = acpi_power_meter_notify,
},
+ .drv.pm = &acpi_power_meter_pm,
};
/* Module init/exit routines */
OpenPOWER on IntegriCloud