Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932363AbcCBA7s (ORCPT ); Tue, 1 Mar 2016 19:59:48 -0500 Received: from mail333.us4.mandrillapp.com ([205.201.137.77]:56744 "EHLO mail333.us4.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753812AbcCAX4V (ORCPT ); Tue, 1 Mar 2016 18:56:21 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; q=dns; s=mandrill; d=linuxfoundation.org; b=KiGXO9gjuGclS8F6fokLIZSv51WHODH647moHPTlgESEp+d3rzGNKEgQhzAzx0PYTDHTzponOeEc M7JrSa8c6NU+VCeHZOzcEO3umMYnXbqqDlvg6oN9bi+ANkNch9vc6s4GiFUfDYVQSQFbj+hXRJJ8 OFaFtVGZV78jXaLJ95E=; From: Greg Kroah-Hartman Subject: [PATCH 4.4 116/342] [media] rc: sunxi-cir: Initialize the spinlock properly X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Chen-Yu Tsai , Hans de Goede , Mauro Carvalho Chehab Message-Id: <20160301234531.706503864@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.e92f832622114739824e5b132eec7d0a X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:54:22 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 36 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Chen-Yu Tsai commit 768acf46e1320d6c41ed1b7c4952bab41c1cde79 upstream. 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 Acked-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/rc/sunxi-cir.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/media/rc/sunxi-cir.c +++ b/drivers/media/rc/sunxi-cir.c @@ -153,6 +153,8 @@ static int sunxi_ir_probe(struct platfor 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