From 6eb9435b874ae5ff56d56952167a8e9be5c5deeb Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 7 Apr 2010 16:19:36 -0300 Subject: V4L/DVB: ir: Make sure that the spinlocks are properly initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some spinlocks are not properly initialized on ir core: [ 471.714132] BUG: spinlock bad magic on CPU#0, modprobe/1899 [ 471.719838] lock: f92a08ac, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [ 471.727301] Pid: 1899, comm: modprobe Not tainted 2.6.33 #36 [ 471.733062] Call Trace: [ 471.735537] [] ? printk+0x1d/0x22 [ 471.739866] [] spin_bug+0xa3/0xf0 [ 471.744224] [] do_raw_spin_lock+0x7d/0x160 [ 471.749364] [] ? ir_rc5_register+0x6f/0xf0 [ir_rc5_decoder] So, use static initialization for the static spinlocks, instead of the dynamic ones (currently used), as proposed by David Härdeman on one of his RFC patches. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/IR/rc-map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/media/IR/rc-map.c') diff --git a/drivers/media/IR/rc-map.c b/drivers/media/IR/rc-map.c index 2f6201ce1898..ff185c054267 100644 --- a/drivers/media/IR/rc-map.c +++ b/drivers/media/IR/rc-map.c @@ -17,8 +17,7 @@ /* Used to handle IR raw handler extensions */ static LIST_HEAD(rc_map_list); -static spinlock_t rc_map_lock; - +static DEFINE_SPINLOCK(rc_map_lock); static struct rc_keymap *seek_rc_map(const char *name) { -- cgit v1.2.3