diff options
author | Oliver Hartkopp <socketcan@hartkopp.net> | 2010-05-19 02:46:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-21 02:21:45 -0400 |
commit | 1f01bfd202bc539bccd282befa2bbdb8d6ad80ee (patch) | |
tree | 77930cd6a9c7ffb724cd14e99ddc16f75787afc5 /drivers | |
parent | 0f0b405cd16f7aaff84a935984cae421897d725d (diff) |
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.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/sja1000/sja1000.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/can/sja1000/sja1000.c b/drivers/net/can/sja1000/sja1000.c index 85f7cbfe8e5f..0a8de01d52f7 100644 --- a/drivers/net/can/sja1000/sja1000.c +++ b/drivers/net/can/sja1000/sja1000.c | |||
@@ -599,6 +599,8 @@ struct net_device *alloc_sja1000dev(int sizeof_priv) | |||
599 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | | 599 | priv->can.ctrlmode_supported = CAN_CTRLMODE_3_SAMPLES | |
600 | CAN_CTRLMODE_BERR_REPORTING; | 600 | CAN_CTRLMODE_BERR_REPORTING; |
601 | 601 | ||
602 | spin_lock_init(&priv->cmdreg_lock); | ||
603 | |||
602 | if (sizeof_priv) | 604 | if (sizeof_priv) |
603 | priv->priv = (void *)priv + sizeof(struct sja1000_priv); | 605 | priv->priv = (void *)priv + sizeof(struct sja1000_priv); |
604 | 606 | ||