slimbus: core: add missing spin_lock_init on txn_lock

This change “slimbus: core: add missing spin_lock_init on txn_lock” in Linux kernel is authored by Srinivas Kandagatla <srinivas.kandagatla [at] linaro.org> on Mon Jan 14 13:44:49 2019 +0000.

slimbus: core: add missing spin_lock_init on txn_lock

Add missing spin lock intialization this also fixes the spinlock bad magic
warning.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 8147760.

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/slimbus/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 8ffdc98..b2f07d2 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -274,6 +274,7 @@ int slim_register_controller(struct slim_controller *ctrl)
 	mutex_init(&ctrl->lock);
 	mutex_init(&ctrl->sched.m_reconf);
 	init_completion(&ctrl->sched.pause_comp);
+	spin_lock_init(&ctrl->txn_lock);
 
 	dev_dbg(ctrl->dev, "Bus [%s] registered:dev:%pn",
 		ctrl->name, ctrl->dev);

The commit for this change in Linux stable tree is 8147760 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *