From patchwork Fri Feb 12 16:26:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Carmody X-Patchwork-Id: 78909 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 o1CGQ1Jg018782 for ; Fri, 12 Feb 2010 16:26:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757169Ab0BLQZ7 (ORCPT ); Fri, 12 Feb 2010 11:25:59 -0500 Received: from smtp.nokia.com ([192.100.105.134]:63300 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757155Ab0BLQZ6 (ORCPT ); Fri, 12 Feb 2010 11:25:58 -0500 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1CGOa6i009408; Fri, 12 Feb 2010 10:25:54 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Feb 2010 18:24:49 +0200 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 12 Feb 2010 18:24:49 +0200 Received: from localhost.localdomain (esdhcp04142.research.nokia.com [172.21.41.42]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1CGOkr8001934; Fri, 12 Feb 2010 18:24:47 +0200 From: Phil Carmody To: omar.ramirez@ti.com Cc: nm@ti.com, linux-omap@vger.kernel.org Subject: [PATCH 1/2] dspbridge: proc: it's a pointer, not a handle Date: Fri, 12 Feb 2010 18:26:53 +0200 Message-Id: X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1265992014-7917-1-git-send-email-ext-phil.2.carmody@nokia.com> References: <1265992014-7917-1-git-send-email-ext-phil.2.carmody@nokia.com> X-OriginalArrivalTime: 12 Feb 2010 16:24:49.0172 (UTC) FILETIME=[E5AB9D40:01CAABFF] X-Nokia-AV: Clean 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]); Fri, 12 Feb 2010 16:26:01 +0000 (UTC) diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index 2ccbc9b..7bc1bcd 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -313,7 +313,6 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, DSP_STATUS status = DSP_EFAIL; u32 dwAutoStart = 0; /* autostart flag */ struct PROC_OBJECT *pProcObject; - struct PROC_OBJECT *hProcObject; char szExecFile[MAXCMDLINELEN]; char *argv[2]; struct MGR_OBJECT *hMgrObject = NULL; @@ -345,19 +344,18 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, GT_0trace(PROC_DebugMask, GT_1CLASS, "NTFY Created \n"); pProcObject->hDevObject = hDevObject; pProcObject->hMgrObject = hMgrObject; - hProcObject = pProcObject; status = DEV_GetIntfFxns(hDevObject, &pProcObject->pIntfFxns); if (DSP_SUCCEEDED(status)) { status = DEV_GetWMDContext(hDevObject, &pProcObject->hWmdContext); if (DSP_FAILED(status)) { - MEM_FreeObject(hProcObject); + MEM_FreeObject(pProcObject); GT_0trace(PROC_DebugMask, GT_7CLASS, "PROC_AutoStart: Failed " "to get WMD Context \n"); } } else { - MEM_FreeObject(hProcObject); + MEM_FreeObject(pProcObject); GT_0trace(PROC_DebugMask, GT_7CLASS, "PROC_AutoStart: Failed to " "get IntFxns \n"); @@ -366,7 +364,7 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, goto func_cont; /* Stop the Device, put it into standby mode */ - status = PROC_Stop(hProcObject); + status = PROC_Stop(pProcObject); if (DSP_FAILED(status)) goto func_cont; @@ -388,9 +386,9 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, argv[0] = szExecFile; argv[1] = NULL; /* ...and try to load it: */ - status = PROC_Load(hProcObject, 1, (CONST char **)argv, NULL); + status = PROC_Load(pProcObject, 1, (CONST char **)argv, NULL); if (DSP_SUCCEEDED(status)) { - status = PROC_Start(hProcObject); + status = PROC_Start(pProcObject); if (DSP_SUCCEEDED(status)) { GT_0trace(PROC_DebugMask, GT_1CLASS, "PROC_AutoStart: Processor started " @@ -409,9 +407,9 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, "No Exec file found \n"); } func_cont: - kfree(hProcObject->g_pszLastCoff); - hProcObject->g_pszLastCoff = NULL; - MEM_FreeObject(hProcObject); + kfree(pProcObject->g_pszLastCoff); + pProcObject->g_pszLastCoff = NULL; + MEM_FreeObject(pProcObject); func_end: GT_1trace(PROC_DebugMask, GT_ENTER, "Exiting PROC_AutoStart, status:0x%x\n", status); @@ -1742,7 +1740,7 @@ func_end: * This does a WMD_BRD_Stop, DEV_Destroy2 and WMD_BRD_Monitor. * In DEV_Destroy2 we delete the node manager. * Parameters: - * hProcObject: Handle to Processor Object + * pProcObject: Pointer to Processor Object * Returns: * DSP_SOK: Processor placed in monitor mode. * !DSP_SOK: Failed to place processor in monitor mode. @@ -1751,10 +1749,9 @@ func_end: * Ensures: * Success: ProcObject state is PROC_IDLE */ -static DSP_STATUS PROC_Monitor(struct PROC_OBJECT *hProcObject) +static DSP_STATUS PROC_Monitor(struct PROC_OBJECT *pProcObject) { DSP_STATUS status = DSP_EFAIL; - struct PROC_OBJECT *pProcObject = (struct PROC_OBJECT *)hProcObject; struct MSG_MGR *hMsgMgr; #ifdef CONFIG_BRIDGE_DEBUG BRD_STATUS uBrdState; @@ -1764,7 +1761,7 @@ static DSP_STATUS PROC_Monitor(struct PROC_OBJECT *hProcObject) DBC_Require(MEM_IsValidHandle(pProcObject, PROC_SIGNATURE)); GT_1trace(PROC_DebugMask, GT_ENTER, "Entered PROC_Monitor, args:\n\t" - "hProcessor: 0x%x\n", hProcObject); + "hProcessor: 0x%x\n", pProcObject); /* This is needed only when Device is loaded when it is * already 'ACTIVE' */ /* Destory the Node Manager, MSG Manager */