msm: SSR: Pull struct restart_wq_data into struct subsys_device
Doing this avoids having to allocate work structs at runtime. We
also don't have to pass information about which device is calling
subsystem_restart because we have the struct in hand with
container_of.
Unfortunately, wakelocks don't have the ability to reference
count, so we must track if the wakelock has been activated or not
and avoid locking it again. When we move to wakeup sources we can
call pm_stay_awake() unconditionally and pm_relax() if the
workqueue scheduling call indicates the item is already
scheduled.
Change-Id: Ie5cf89aa2ea258a1d521e82b397f05ae1c53ad72
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
1 file changed