From patchwork Thu Apr 8 19:37:17 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 91488 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o38JbhXX028842 for ; Thu, 8 Apr 2010 19:37:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933542Ab0DHThn (ORCPT ); Thu, 8 Apr 2010 15:37:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17716 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933150Ab0DHThk convert rfc822-to-8bit (ORCPT ); Thu, 8 Apr 2010 15:37:40 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o38JbdNg022608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Apr 2010 15:37:39 -0400 Received: from pedra (vpn-10-98.rdu.redhat.com [10.11.10.98]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o38JbQNI019431 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Apr 2010 15:37:38 -0400 Date: Thu, 8 Apr 2010 16:37:17 -0300 From: Mauro Carvalho Chehab To: linux-input@vger.kernel.org, Linux Media Mailing List Subject: [PATCH 2/8] V4L/DVB: ir: Make sure that the spinlocks are properly initialized Message-ID: <20100408163717.678b350d@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 08 Apr 2010 19:37:51 +0000 (UTC) diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c index 9d1ada9..48a86cc 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; +DEFINE_SPINLOCK(decoder_lock); enum nec_state { STATE_INACTIVE, diff --git a/drivers/media/IR/ir-raw-event.c b/drivers/media/IR/ir-raw-event.c index 57990a3..4ba7074 100644 --- a/drivers/media/IR/ir-raw-event.c +++ b/drivers/media/IR/ir-raw-event.c @@ -21,7 +21,7 @@ /* Used to handle IR raw handler extensions */ static LIST_HEAD(ir_raw_handler_list); -static spinlock_t ir_raw_handler_lock; +DEFINE_SPINLOCK(ir_raw_handler_lock); /** * RUN_DECODER() - runs an operation on all IR decoders @@ -205,8 +205,6 @@ static void init_decoders(struct work_struct *work) void ir_raw_init(void) { - spin_lock_init(&ir_raw_handler_lock); - #ifdef MODULE INIT_WORK(&wq_load, init_decoders); schedule_work(&wq_load); diff --git a/drivers/media/IR/ir-rc5-decoder.c b/drivers/media/IR/ir-rc5-decoder.c index a62277b..b8a33ae 100644 --- a/drivers/media/IR/ir-rc5-decoder.c +++ b/drivers/media/IR/ir-rc5-decoder.c @@ -29,7 +29,7 @@ static unsigned int ir_rc5_remote_gap = 888888; /* Used to register rc5_decoder clients */ static LIST_HEAD(decoder_list); -static spinlock_t decoder_lock; +DEFINE_SPINLOCK(decoder_lock); enum rc5_state { STATE_INACTIVE, diff --git a/drivers/media/IR/rc-map.c b/drivers/media/IR/rc-map.c index 2f6201c..38b3489 100644 --- a/drivers/media/IR/rc-map.c +++ b/drivers/media/IR/rc-map.c @@ -17,8 +17,7 @@ /* Used to handle IR raw handler extensions */ static LIST_HEAD(rc_map_list); -static spinlock_t rc_map_lock; - +DEFINE_SPINLOCK(rc_map_lock); static struct rc_keymap *seek_rc_map(const char *name) {