提交 1f01bfd2 编写于 作者: O Oliver Hartkopp 提交者: David S. Miller

can: SJA1000 add missing spin_lock_init()

As remarked by Sam Ravnborg the spin_lock variable, that has been introduced
in commit 57c8a456 ("can: Fix SJA1000 command
register writes on SMP systems") has not been initialized properly.

This patch adds the initialization to allow spinlock debugging.
Signed-off-by: NOliver Hartkopp <socketcan@hartkopp.net>
CC: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0f0b405c
...@@ -599,6 +599,8 @@ struct net_device *alloc_sja1000dev(int sizeof_priv) ...@@ -599,6 +599,8 @@ struct net_device *alloc_sja1000dev(int sizeof_priv)
priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
CAN_CTRLMODE_BERR_REPORTING; CAN_CTRLMODE_BERR_REPORTING;
spin_lock_init(&priv->cmdreg_lock);
if (sizeof_priv) if (sizeof_priv)
priv->priv = (void *)priv + sizeof(struct sja1000_priv); priv->priv = (void *)priv + sizeof(struct sja1000_priv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册