power: smb349: add spin_lock initializer
Using an unitiliazed spinlock can cause a kernel BUG
in the SMB349 driver.
Fix this by initializing the spinlock in the probe
function.
Change-Id: I9ce691398939f7104b71b58505e2d15dc910328c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
diff --git a/drivers/power/smb349.c b/drivers/power/smb349.c
index ffc92d5..f9ca81c 100644
--- a/drivers/power/smb349.c
+++ b/drivers/power/smb349.c
@@ -617,6 +617,8 @@
the_smb349_chg = smb349_chg;
+ spin_lock_init(&smb349_chg->lock);
+
create_debugfs_entries(smb349_chg);
INIT_WORK(&smb349_chg->chg_work, chg_worker);