Commit 0bc5b2de authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Acked-by: default avatarMagnus Damm <damm@opensource.se>
parent 79620414
...@@ -107,7 +107,7 @@ static int pd_power_down_a3rv(struct generic_pm_domain *genpd) ...@@ -107,7 +107,7 @@ static int pd_power_down_a3rv(struct generic_pm_domain *genpd)
/* try to power down A4LC after A3RV is requested off */ /* try to power down A4LC after A3RV is requested off */
pm_genpd_poweron(&sh7372_a4lc.genpd); pm_genpd_poweron(&sh7372_a4lc.genpd);
queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); genpd_queue_power_off_work(&sh7372_a4lc.genpd);
return ret; return ret;
} }
......
...@@ -222,7 +222,7 @@ static bool genpd_abort_poweroff(struct generic_pm_domain *genpd) ...@@ -222,7 +222,7 @@ static bool genpd_abort_poweroff(struct generic_pm_domain *genpd)
* Queue up the execution of pm_genpd_poweroff() unless it's already been done * Queue up the execution of pm_genpd_poweroff() unless it's already been done
* before. * before.
*/ */
static void genpd_queue_power_off_work(struct generic_pm_domain *genpd) void genpd_queue_power_off_work(struct generic_pm_domain *genpd)
{ {
if (!work_pending(&genpd->power_off_work)) if (!work_pending(&genpd->power_off_work))
queue_work(pm_wq, &genpd->power_off_work); queue_work(pm_wq, &genpd->power_off_work);
......
...@@ -73,6 +73,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd, ...@@ -73,6 +73,7 @@ extern void pm_genpd_init(struct generic_pm_domain *genpd,
struct dev_power_governor *gov, bool is_off); struct dev_power_governor *gov, bool is_off);
extern int pm_genpd_poweron(struct generic_pm_domain *genpd); extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
extern void pm_genpd_poweroff_unused(void); extern void pm_genpd_poweroff_unused(void);
extern void genpd_queue_power_off_work(struct generic_pm_domain *genpd);
#else #else
static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
struct device *dev) struct device *dev)
...@@ -101,6 +102,7 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd) ...@@ -101,6 +102,7 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
return -ENOSYS; return -ENOSYS;
} }
static inline void pm_genpd_poweroff_unused(void) {} static inline void pm_genpd_poweroff_unused(void) {}
static inline void genpd_queue_power_off_work(struct generic_pm_domain *gpd) {}
#endif #endif
#endif /* _LINUX_PM_DOMAIN_H */ #endif /* _LINUX_PM_DOMAIN_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment