Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 80384c35 authored by Stephen Boyd's avatar Stephen Boyd Committed by Tri Vo
Browse files

UPSTREAM: power: supply: Init device wakeup after device_add()



We may want to use the device pointer in device_init_wakeup() with
functions that expect the device to already be added with device_add().
For example, if we were to link the device initializing wakeup to
something in sysfs such as a class for wakeups we'll run into an error.
It looks like this code was written with the assumption that the device
would be added before initializing wakeup due to the order of operations
in power_supply_unregister().

Let's change the order of operations so we don't run into problems here.

Fixes: 948dcf96 ("power_supply: Prevent suspend until power supply events are processed")
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tri Vo <trong@android.com>
Cc: Kalesh Singh <kaleshsingh@google.com>
Cc: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
(cherry picked from commit 8288022284859acbcc3cf1a073a1e2692d6c2543)
Bug: 129087298
Signed-off-by: default avatarTri Vo <trong@google.com>
Change-Id: I7173543ba4f47b6a53bd8d2c76346691d29fad8c
parent 47b82948
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment