From patchwork Fri Jul 1 08:52:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 934932 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p618r2Wq015961 for ; Fri, 1 Jul 2011 08:53:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755688Ab1GAIxA (ORCPT ); Fri, 1 Jul 2011 04:53:00 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:58452 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755707Ab1GAIxA (ORCPT ); Fri, 1 Jul 2011 04:53:00 -0400 Received: by mail-bw0-f46.google.com with SMTP id 5so2453487bwd.19 for ; Fri, 01 Jul 2011 01:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=hZXU1zO5IQUZ9yFbx7aKXaEsfck12CplQZCUugdf1SA=; b=rVmfPW8w7QrybUAopBJ9vxaibnj2/oL2cjXaCu1QRiNW5Lt1Zc2QMIJYToui8dzahh P68I/fpAtY8SIkfpQyTZWD/u8lv3LHYGBjxWRBDIu4bBD6K7PIuiUc90Kf2EUHgrTwxs kfla0m8BcMoEINets+BAqFsP/3ojZsM8NQVm0= Received: by 10.204.231.198 with SMTP id jr6mr2802761bkb.205.1309510379571; Fri, 01 Jul 2011 01:52:59 -0700 (PDT) Received: from localhost (host-94-101-4-66.igua.fi [94.101.4.66]) by mx.google.com with ESMTPS id o3sm2819841bka.0.2011.07.01.01.52.58 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jul 2011 01:52:58 -0700 (PDT) From: Jarkko Nikula To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Janusz Krzysztofik , Peter Ujfalusi , Jarkko Nikula Subject: [RFC 03/12] omap: mcbsp: Remove port number enums Date: Fri, 1 Jul 2011 11:52:27 +0300 Message-Id: <1309510356-27147-4-git-send-email-jhnikula@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1309510356-27147-1-git-send-email-jhnikula@gmail.com> References: <1309510356-27147-1-git-send-email-jhnikula@gmail.com> 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.6 (demeter1.kernel.org [140.211.167.41]); Fri, 01 Jul 2011 08:53:03 +0000 (UTC) These McBSP port number enums are used only in two places in the McBSP code so we may remove then and just use numeric values like rest of the code does. Signed-off-by: Jarkko Nikula --- arch/arm/mach-omap1/mcbsp.c | 4 ++-- arch/arm/plat-omap/include/plat/mcbsp.h | 10 +--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index d9af981..ab7395d 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c @@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id) * On 1510, 1610 and 1710, McBSP1 and McBSP3 * are DSP public peripherals. */ - if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { + if (id == 0 || id == 2) { if (dsp_use++ == 0) { api_clk = clk_get(NULL, "api_ck"); dsp_clk = clk_get(NULL, "dsp_ck"); @@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id) static void omap1_mcbsp_free(unsigned int id) { - if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { + if (id == 0 || id == 2) { if (--dsp_use == 0) { if (!IS_ERR(api_clk)) { clk_disable(api_clk); diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index 63464ad..9882c65 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h @@ -33,7 +33,7 @@ #define OMAP_MCBSP_PLATFORM_DEVICE(port_nr) \ static struct platform_device omap_mcbsp##port_nr = { \ .name = "omap-mcbsp-dai", \ - .id = OMAP_MCBSP##port_nr, \ + .id = port_nr - 1, \ } #define MCBSP_CONFIG_TYPE2 0x2 @@ -332,14 +332,6 @@ struct omap_mcbsp_reg_cfg { }; typedef enum { - OMAP_MCBSP1 = 0, - OMAP_MCBSP2, - OMAP_MCBSP3, - OMAP_MCBSP4, - OMAP_MCBSP5 -} omap_mcbsp_id; - -typedef enum { OMAP_MCBSP_WORD_8 = 0, OMAP_MCBSP_WORD_12, OMAP_MCBSP_WORD_16,