power: smb1360-charger-fg: Adjust the probe code sequence
Currently, wakeup source is inititalized before the real hardware being
probed. If the driver is enabled but no real hardware connected, the
driver will probe failed but the wakeup source doesn't get removed from
the wakeup_sources list. This trash wakeup source would be referenced
somewhere and cause unexpected behavior.
Adjust the probe code sequence to detect the real hardware before
requesting other resources, and make sure the wakeup source and the
mutex could be trashed if any probe failures.
Change-Id: I43e26e14e00e65ae7b6e16177e0af948dc0fe256
Signed-off-by:
Fenglin Wu <fenglinw@codeaurora.org>
Loading
Please register or sign in to comment