diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-07 21:19:36 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 17:57:01 +0200 |
commit | 6eb9435b874ae5ff56d56952167a8e9be5c5deeb (patch) | |
tree | a31bd6732a7396d7350baf5e5019b4037737609b /drivers/media/IR/ir-nec-decoder.c | |
parent | V4L/DVB: em28xx: fix a regression caused by the rc-map changes (diff) | |
download | linux-6eb9435b874ae5ff56d56952167a8e9be5c5deeb.tar.xz linux-6eb9435b874ae5ff56d56952167a8e9be5c5deeb.zip |
V4L/DVB: ir: Make sure that the spinlocks are properly initialized
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: <none>/-1, .owner_cpu: 0
[ 471.727301] Pid: 1899, comm: modprobe Not tainted 2.6.33 #36
[ 471.733062] Call Trace:
[ 471.735537] [<c1498793>] ? printk+0x1d/0x22
[ 471.739866] [<c12694e3>] spin_bug+0xa3/0xf0
[ 471.744224] [<c126962d>] do_raw_spin_lock+0x7d/0x160
[ 471.749364] [<f92a01ff>] ? 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 <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/ir-nec-decoder.c')
-rw-r--r-- | drivers/media/IR/ir-nec-decoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 9d1ada95aa72..18918e52c0c0 100644 --- a/drivers/media/IR/ir-nec-decoder.c +++ b/drivers/media/IR/ir-nec-decoder.c @@ -25,7 +25,7 @@ /* Used to register nec_decoder clients */ static LIST_HEAD(decoder_list); -static spinlock_t decoder_lock; +static DEFINE_SPINLOCK(decoder_lock); enum nec_state { STATE_INACTIVE, |