From patchwork Thu Feb 11 21:54:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Chitriki X-Patchwork-Id: 78829 X-Patchwork-Delegate: omar.ramirez@ti.com 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 o1BLsroB022144 for ; Thu, 11 Feb 2010 21:54:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757133Ab0BKVyw (ORCPT ); Thu, 11 Feb 2010 16:54:52 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:43100 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757058Ab0BKVyw (ORCPT ); Thu, 11 Feb 2010 16:54:52 -0500 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1BLsmRi015527 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Feb 2010 15:54:48 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o1BLslio011266; Thu, 11 Feb 2010 15:54:47 -0600 (CST) Received: from soldel-laptop (soldel-laptop.am.dhcp.ti.com [128.247.79.63]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o1BLslZ13204; Thu, 11 Feb 2010 15:54:47 -0600 (CST) Received: by soldel-laptop (Postfix, from userid 1000) id 0EDA9606040; Thu, 11 Feb 2010 15:54:47 -0600 (CST) From: Deepak Chitriki To: linux-omap Cc: Deepak Chitriki , Ameya Palande , Omar Ramirez Luna , Nishanth Menon Subject: [PATCH v4] DSPBRIDGE: Fix to avoid possible recursive locking Date: Thu, 11 Feb 2010 15:54:44 -0600 Message-Id: <1265925284-7536-1-git-send-email-deepak.chitriki@ti.com> X-Mailer: git-send-email 1.6.3.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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, 11 Feb 2010 21:54:54 +0000 (UTC) diff --git a/drivers/dsp/bridge/wmd/msg_sm.c b/drivers/dsp/bridge/wmd/msg_sm.c index 3a275f1..8475e20 100644 --- a/drivers/dsp/bridge/wmd/msg_sm.c +++ b/drivers/dsp/bridge/wmd/msg_sm.c @@ -295,11 +295,8 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue, (struct list_head *)pMsgFrame); if (LST_IsEmpty(hMsgQueue->msgUsedList)) SYNC_ResetEvent(hMsgQueue->hSyncEvent); - else { - NTFY_Notify(hMsgQueue->hNtfy, - DSP_NODEMESSAGEREADY); + else SYNC_SetEvent(hMsgQueue->hSyncEvent); - } fGotMsg = true; } @@ -347,11 +344,8 @@ DSP_STATUS WMD_MSG_Get(struct MSG_QUEUE *hMsgQueue, } hMsgQueue->refCount--; /* Reset the event if there are still queued messages */ - if (!LST_IsEmpty(hMsgQueue->msgUsedList)) { - NTFY_Notify(hMsgQueue->hNtfy, - DSP_NODEMESSAGEREADY); + if (!LST_IsEmpty(hMsgQueue->msgUsedList)) SYNC_SetEvent(hMsgQueue->hSyncEvent); - } /* Exit critical section */ (void)SYNC_LeaveCS(hMsgMgr->hSyncCS); }