From: Ben Greear Date: Fri, 15 Oct 2010 22:51:32 +0000 (-0700) Subject: ath5k: Properly initialize ath_common->cc_lock. X-Git-Tag: v2.6.37-rc1~11^2~17^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9192f715bc6304b97fe06c6215d4897a5c279e81;p=platform%2Fkernel%2Flinux-3.10.git ath5k: Properly initialize ath_common->cc_lock. Otherwise, lockdep splats, at the least: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 0, comm: swapper Not tainted 2.6.36-rc8-wl+ #32 Call Trace: [] ? printk+0xf/0x17 [] register_lock_class+0x5a/0x29e [] __lock_acquire+0xa2/0xb8c [] ? mark_lock+0x1e/0x1de [] ? acpi_get_override_irq+0x85/0x8c [] ? trace_hardirqs_off+0xb/0xd [] lock_acquire+0x5a/0x78 [] ? ath5k_ani_calibration+0x24/0x52b [ath5k] [] _raw_spin_lock_bh+0x20/0x2f [] ? ath5k_ani_calibration+0x24/0x52b [ath5k] [] ath5k_ani_calibration+0x24/0x52b [ath5k] [] ? tasklet_action+0x3b/0xc6 [] ath5k_tasklet_ani+0x18/0x22 [ath5k] [] tasklet_action+0x73/0xc6 [] __do_softirq+0x86/0x111 [] do_softirq+0x36/0x5a [] irq_exit+0x35/0x69 [] do_IRQ+0x86/0x9a [] common_interrupt+0x2e/0x40 [] ? do_adjtimex+0x223/0x55e [] ? mwait_idle+0x5c/0x6c [] cpu_idle+0x4e/0x6b [] rest_init+0x8d/0x92 [] start_kernel+0x320/0x325 [] i386_start_kernel+0xd0/0xd7 Signed-off-by: Ben Greear Acked-by: Bruno Randolf Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index f1ae75d..8251946 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -3580,6 +3580,7 @@ ath5k_pci_probe(struct pci_dev *pdev, common->ah = sc->ah; common->hw = hw; common->cachelsz = csz << 2; /* convert to bytes */ + spin_lock_init(&common->cc_lock); /* Initialize device */ ret = ath5k_hw_attach(sc);