diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-14 14:59:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-14 14:59:07 -0400 |
commit | 0bc5b2debb832191a42baea7ff59d2ca6ce9f7d5 (patch) | |
tree | cb7f1f7a20fb9a9d2483714a8e9f0a3a84862245 | |
parent | 796204142a98b6e0e71b494e808d1b6ee62cc75f (diff) |
ARM / shmobile: Use genpd_queue_power_off_work()
Make pd_power_down_a3rv() use genpd_queue_power_off_work() to queue
up the powering off of the A4LC domain to avoid queuing it up when
it is pending.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 2 | ||||
-rw-r--r-- | drivers/base/power/domain.c | 2 | ||||
-rw-r--r-- | include/linux/pm_domain.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index f47281a57d43..0b07138908b7 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -107,7 +107,7 @@ static int pd_power_down_a3rv(struct generic_pm_domain *genpd) | |||
107 | 107 | ||
108 | /* try to power down A4LC after A3RV is requested off */ | 108 | /* try to power down A4LC after A3RV is requested off */ |
109 | pm_genpd_poweron(&sh7372_a4lc.genpd); | 109 | pm_genpd_poweron(&sh7372_a4lc.genpd); |
110 | queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); | 110 | genpd_queue_power_off_work(&sh7372_a4lc.genpd); |
111 | 111 | ||
112 | return ret; | 112 | return ret; |
113 | } | 113 | } |
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c2c537de22b6..00ed4f32a4de 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -222,7 +222,7 @@ static bool genpd_abort_poweroff(struct generic_pm_domain *genpd) | |||
222 | * Queue up the execution of pm_genpd_poweroff() unless it's already been done | 222 | * Queue up the execution of pm_genpd_poweroff() unless it's already been done |
223 | * before. | 223 | * before. |
224 | */ | 224 | */ |
225 | static void genpd_queue_power_off_work(struct generic_pm_domain *genpd) | 225 | void genpd_queue_power_off_work(struct generic_pm_domain *genpd) |
226 | { | 226 | { |
227 | if (!work_pending(&genpd->power_off_work)) | 227 | if (!work_pending(&genpd->power_off_work)) |
228 | queue_work(pm_wq, &genpd->power_off_work); | 228 | queue_work(pm_wq, &genpd->power_off_work); |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 3e4f3d308f5e..21097cb086fe 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -73,6 +73,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd, | |||
73 | struct dev_power_governor *gov, bool is_off); | 73 | struct dev_power_governor *gov, bool is_off); |
74 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); | 74 | extern int pm_genpd_poweron(struct generic_pm_domain *genpd); |
75 | extern void pm_genpd_poweroff_unused(void); | 75 | extern void pm_genpd_poweroff_unused(void); |
76 | extern void genpd_queue_power_off_work(struct generic_pm_domain *genpd); | ||
76 | #else | 77 | #else |
77 | static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, | 78 | static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, |
78 | struct device *dev) | 79 | struct device *dev) |
@@ -101,6 +102,7 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd) | |||
101 | return -ENOSYS; | 102 | return -ENOSYS; |
102 | } | 103 | } |
103 | static inline void pm_genpd_poweroff_unused(void) {} | 104 | static inline void pm_genpd_poweroff_unused(void) {} |
105 | static inline void genpd_queue_power_off_work(struct generic_pm_domain *gpd) {} | ||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | #endif /* _LINUX_PM_DOMAIN_H */ | 108 | #endif /* _LINUX_PM_DOMAIN_H */ |