From patchwork Tue Sep 7 14:33:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 160761 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o87EaESp028836 for ; Tue, 7 Sep 2010 14:36:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260Ab0IGOeB (ORCPT ); Tue, 7 Sep 2010 10:34:01 -0400 Received: from www.tglx.de ([62.245.132.106]:43941 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244Ab0IGOd4 (ORCPT ); Tue, 7 Sep 2010 10:33:56 -0400 Received: from localhost6.localdomain6 (www.tglx.de [127.0.0.1]) by www.tglx.de (8.13.8/8.13.8/TGLX-2007100201) with ESMTP id o87EXRML010442; Tue, 7 Sep 2010 16:33:27 +0200 Message-Id: <20100907125056.799770214@linutronix.de> User-Agent: quilt/0.47-1 Date: Tue, 07 Sep 2010 14:33:27 -0000 From: Thomas Gleixner To: LKML Cc: Andrew Morton , Ingo Molnar , Peter Zijlstra , Christoph Hellwig , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [patch 22/30] dvb: Convert "mutex" to semaphore References: <20100907124636.880953480@linutronix.de> Content-Disposition: inline; filename=drivers-media-dvb-dvb-core-frontend-sema.patch X-Virus-Scanned: clamav-milter 0.95.3 at www.tglx.de X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on www.tglx.de 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 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Sep 2010 14:36:15 +0000 (UTC) Index: linux-2.6/drivers/media/dvb/dvb-core/dvb_frontend.c =================================================================== --- linux-2.6.orig/drivers/media/dvb/dvb-core/dvb_frontend.c +++ linux-2.6/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -702,7 +702,7 @@ static void dvb_frontend_stop(struct dvb kthread_stop(fepriv->thread); - init_MUTEX (&fepriv->sem); + sema_init(&fepriv->sem, 1); fepriv->state = FESTATE_IDLE; /* paranoia check in case a signal arrived */ @@ -2061,7 +2061,7 @@ int dvb_register_frontend(struct dvb_ada } fepriv = fe->frontend_priv; - init_MUTEX (&fepriv->sem); + sema_init(&fepriv->sem, 1); init_waitqueue_head (&fepriv->wait_queue); init_waitqueue_head (&fepriv->events.wait_queue); mutex_init(&fepriv->events.mtx);