Skip to content

Commit

Permalink
[media] rc: sunxi-cir: Initialize the spinlock properly
Browse files Browse the repository at this point in the history
[ Upstream commit 768acf4 ]

The driver allocates the spinlock but fails to initialize it correctly.
The kernel reports a BUG indicating bad spinlock magic when spinlock
debugging is enabled.

Call spin_lock_init() on it to initialize it correctly.

Fixes: b4e3e59 ("[media] rc: add sunxi-ir driver")

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
  • Loading branch information
wens authored and sashalevin committed Feb 1, 2016
1 parent 4476dc6 commit 33c7c20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/rc/sunxi-cir.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ static int sunxi_ir_probe(struct platform_device *pdev)
if (!ir)
return -ENOMEM;

spin_lock_init(&ir->ir_lock);

if (of_device_is_compatible(dn, "allwinner,sun5i-a13-ir"))
ir->fifo_size = 64;
else
Expand Down

0 comments on commit 33c7c20

Please sign in to comment.