Skip to content

Commit 33c7c20

Browse files
wenssashalevin
authored andcommitted
[media] rc: sunxi-cir: Initialize the spinlock properly
[ 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 <[email protected]> Acked-by: Hans de Goede <[email protected]> Cc: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 4476dc6 commit 33c7c20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/media/rc/sunxi-cir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ static int sunxi_ir_probe(struct platform_device *pdev)
153153
if (!ir)
154154
return -ENOMEM;
155155

156+
spin_lock_init(&ir->ir_lock);
157+
156158
if (of_device_is_compatible(dn, "allwinner,sun5i-a13-ir"))
157159
ir->fifo_size = 64;
158160
else

0 commit comments

Comments
 (0)