]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: iio: isl29028: use the runtime power management for system sleep
authorBrian Masney <masneyb@onstation.org>
Thu, 9 Feb 2017 01:54:28 +0000 (20:54 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sat, 11 Feb 2017 09:46:38 +0000 (09:46 +0000)
With the introduction of runtime power management in commit 2db5054ac28d
("staging: iio: isl29028: add runtime power management support"), the
system could go to sleep and turn off the device without notifying the
runtime power management code. This patch changes the system suspend
and resume to go through the runtime power management.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/isl29028.c

index 177dceda0820e2e988f75fe5e4ee4a845da10a3e..a8f0c6c2dd95e6ddd498c4c3df54e3494adac184 100644 (file)
@@ -656,7 +656,8 @@ static int __maybe_unused isl29028_resume(struct device *dev)
 }
 
 static const struct dev_pm_ops isl29028_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(isl29028_suspend, isl29028_resume)
+       SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
+                               pm_runtime_force_resume)
        SET_RUNTIME_PM_OPS(isl29028_suspend, isl29028_resume, NULL)
 };