]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
netx-eth: initialize per device spinlock
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 4 Dec 2008 06:18:59 +0000 (22:18 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Dec 2008 06:18:59 +0000 (22:18 -0800)
The spinlock used in the netx-eth driver was never properly initialized.
This was noticed using CONFIG_DEBUG_SPINLOCK=y

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netx-eth.c

index b9bed82e1d214089f5b4e6682a965e11c781d6e5..b289a0a2b94563ea37b910c05deef15b6b61d0b6 100644 (file)
@@ -401,6 +401,8 @@ static int netx_eth_drv_probe(struct platform_device *pdev)
        priv->xmac_base = priv->xc->xmac_base;
        priv->sram_base = priv->xc->sram_base;
 
+       spin_lock_init(&priv->lock);
+
        ret = pfifo_request(PFIFO_MASK(priv->id));
        if (ret) {
                printk("unable to request PFIFO\n");