diff options
| author | Chen-Yu Tsai <wens@csie.org> | 2015-12-21 23:27:35 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-23 12:51:40 -0500 |
| commit | 768acf46e1320d6c41ed1b7c4952bab41c1cde79 (patch) | |
| tree | e7a0399af73a151e9b64721236bfe0c2eb43290b | |
| parent | 4020c18a94dda9a5a52059f00ae582eada67b810 (diff) | |
[media] rc: sunxi-cir: Initialize the spinlock properly
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: b4e3e59fb59c ("[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>
| -rw-r--r-- | drivers/media/rc/sunxi-cir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/rc/sunxi-cir.c b/drivers/media/rc/sunxi-cir.c index 7830aef3db45..40f77685cc4a 100644 --- a/drivers/media/rc/sunxi-cir.c +++ b/drivers/media/rc/sunxi-cir.c | |||
| @@ -153,6 +153,8 @@ static int sunxi_ir_probe(struct platform_device *pdev) | |||
| 153 | if (!ir) | 153 | if (!ir) |
| 154 | return -ENOMEM; | 154 | return -ENOMEM; |
| 155 | 155 | ||
| 156 | spin_lock_init(&ir->ir_lock); | ||
| 157 | |||
| 156 | if (of_device_is_compatible(dn, "allwinner,sun5i-a13-ir")) | 158 | if (of_device_is_compatible(dn, "allwinner,sun5i-a13-ir")) |
| 157 | ir->fifo_size = 64; | 159 | ir->fifo_size = 64; |
| 158 | else | 160 | else |
