Skip to content

Commit

Permalink
can: SJA1000 add missing spin_lock_init()
Browse files Browse the repository at this point in the history
As remarked by Sam Ravnborg the spin_lock variable, that has been introduced
in commit 57c8a45 ("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>
  • Loading branch information
Oliver Hartkopp authored and David S. Miller committed May 21, 2010
1 parent 0f0b405 commit 1f01bfd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/can/sja1000/sja1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1f01bfd

Please sign in to comment.