From patchwork Thu Apr 15 21:16:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hebbar, Shivananda" X-Patchwork-Id: 92841 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 o3FLGmZZ011934 for ; Thu, 15 Apr 2010 21:16:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757181Ab0DOVQv (ORCPT ); Thu, 15 Apr 2010 17:16:51 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:40287 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757178Ab0DOVQu convert rfc822-to-8bit (ORCPT ); Thu, 15 Apr 2010 17:16:50 -0400 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3FLGldH032052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 15 Apr 2010 16:16:49 -0500 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id o3FLGlda011009 for ; Fri, 16 Apr 2010 02:46:47 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Fri, 16 Apr 2010 02:46:47 +0530 From: "Hebbar, Shivananda" To: "linux-omap@vger.kernel.org" CC: "Ramirez Luna, Omar" Date: Fri, 16 Apr 2010 02:46:44 +0530 Subject: [RFC][PATCH 1/13] DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION -> -EPERM) Thread-Topic: [RFC][PATCH 1/13] DSPBRIDGE: Cleanup custom error code (DSP_EDIRECTION -> -EPERM) Thread-Index: AcrYYSDGgErM4qA2Sya9nqVeJuKFNgEc2uZA Message-ID: <19F8576C6E063C45BE387C64729E7394044E136FD8@dbde02.ent.ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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, 15 Apr 2010 21:16:52 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/dspbridge/errbase.h b/arch/arm/plat-omap/include/dspbridge/errbase.h index a9ecb71..8a0e48c 100644 --- a/arch/arm/plat-omap/include/dspbridge/errbase.h +++ b/arch/arm/plat-omap/include/dspbridge/errbase.h @@ -79,9 +79,6 @@ /* A failure occurred during a delete operation */ #define DSP_EDELETE (DSP_EBASE + 5) -/* The specified direction is invalid */ -#define DSP_EDIRECTION (DSP_EBASE + 6) - /* A stream has been issued the maximum number of buffers allowed in the * stream at once ; buffers must be reclaimed from the stream before any * more can be issued. */ diff --git a/arch/arm/plat-omap/include/dspbridge/strm.h b/arch/arm/plat-omap/include/dspbridge/strm.h index f53d66b..fd27da2 100644 --- a/arch/arm/plat-omap/include/dspbridge/strm.h +++ b/arch/arm/plat-omap/include/dspbridge/strm.h @@ -259,7 +259,7 @@ extern dsp_status strm_issue(struct strm_object *hStrm, IN u8 * pbuf, * Returns: * DSP_SOK: Success. * -EFAULT: Invalid hnode. - * DSP_EDIRECTION: Invalid dir. + * -EPERM: Invalid dir. * -EINVAL: Invalid index. * -EPERM: hnode is not a task or DAIS socket node. * DSP_EFAIL: Unable to open stream. diff --git a/drivers/dsp/bridge/rmgr/strm.c b/drivers/dsp/bridge/rmgr/strm.c index 45a15b4..10d86ca 100644 --- a/drivers/dsp/bridge/rmgr/strm.c +++ b/drivers/dsp/bridge/rmgr/strm.c @@ -495,7 +495,7 @@ dsp_status strm_open(struct node_object *hnode, u32 dir, u32 index, DBC_REQUIRE(pattr != NULL); *phStrm = NULL; if (dir != DSP_TONODE && dir != DSP_FROMNODE) { - status = DSP_EDIRECTION; + status = -EPERM; } else { /* Get the channel id from the node (set in node_connect()) */ status = node_get_channel_id(hnode, dir, index, &ul_chnl_id); @@ -613,7 +613,7 @@ func_cont: DBC_ENSURE((DSP_SUCCEEDED(status) && MEM_IS_VALID_HANDLE((*phStrm), STRM_SIGNATURE)) || (*phStrm == NULL && (status == -EFAULT || - status == DSP_EDIRECTION + status == -EPERM || status == -EINVAL || status == DSP_EFAIL)));