Skip to contentSkip to conversation

can: SJA1000 add missing spin_lock_init()

PATCH Applied Oliver Hartkopp 2 participants 2 messages May 19, 2010 – May 21, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: SJA1000 add missing spin_lock_init()

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

This patch adds the initialization to allow spinlock debugging.

---

drivers/net/can/sja1000/sja1000.c +2 -0
index 85f7cbf..0a8de01 100644
@@ -599,6 +599,8 @@ struct net_device *alloc_sja1000dev(int sizeof_priv)
 	priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES |
 		CAN_CTRLMODE_BERR_REPORTING;
 
+	spin_lock_init(&priv->cmdreg_lock);
+
 	if (sizeof_priv)
 		priv->priv = (void *)priv + sizeof(struct sja1000_priv);
maintainer Applied
#1 lore raw

From: Oliver Hartkopp <[email protected]>
Date: Wed, 19 May 2010 18:46:38 +0200

Quoted 7 lines

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

This patch adds the initialization to allow spinlock debugging.

Applied, thanks!