From patchwork Fri Apr 25 11:58:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolin Chen X-Patchwork-Id: 4059921 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E915DBFF02 for ; Fri, 25 Apr 2014 11:58:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15047203AB for ; Fri, 25 Apr 2014 11:58:17 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C54672039D for ; Fri, 25 Apr 2014 11:58:15 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8FB2E2654C3; Fri, 25 Apr 2014 13:58:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 02A01265382; Fri, 25 Apr 2014 13:57:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4A26426547F; Fri, 25 Apr 2014 13:56:58 +0200 (CEST) Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2lp0241.outbound.protection.outlook.com [207.46.163.241]) by alsa0.perex.cz (Postfix) with ESMTP id 3E045261A12 for ; Fri, 25 Apr 2014 13:56:51 +0200 (CEST) Received: from BLUPR03CA032.namprd03.prod.outlook.com (10.141.30.25) by BLUPR03MB020.namprd03.prod.outlook.com (10.255.208.42) with Microsoft SMTP Server (TLS) id 15.0.934.12; Fri, 25 Apr 2014 11:56:48 +0000 Received: from BN1AFFO11FD031.protection.gbl (2a01:111:f400:7c10::148) by BLUPR03CA032.outlook.office365.com (2a01:111:e400:879::25) with Microsoft SMTP Server (TLS) id 15.0.934.12 via Frontend Transport; Fri, 25 Apr 2014 11:56:48 +0000 Received: from az84smr01.freescale.net (192.88.158.246) by BN1AFFO11FD031.mail.protection.outlook.com (10.58.52.185) with Microsoft SMTP Server (TLS) id 15.0.929.8 via Frontend Transport; Fri, 25 Apr 2014 11:56:47 +0000 Received: from rio.ap.freescale.net (rio.ap.freescale.net [10.192.242.9]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s3PBuW2t014052; Fri, 25 Apr 2014 04:56:40 -0700 From: Nicolin Chen To: Date: Fri, 25 Apr 2014 19:58:20 +0800 Message-ID: X-Mailer: git-send-email 1.8.4 In-Reply-To: References: X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.246; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009001)(6009001)(428001)(189002)(199002)(19580395003)(47776003)(20776003)(19580405001)(79102001)(81542001)(83322001)(87286001)(6806004)(62966002)(81342001)(44976005)(80022001)(89996001)(83072002)(93916002)(85852003)(86362001)(77982001)(76176999)(50986999)(74502001)(74662001)(88136002)(31966008)(50226001)(48376002)(4396001)(99396002)(50466002)(92566001)(92726001)(77156001)(80976001)(46102001)(87936001)(76482001)(36756003)(77096999); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB020; H:az84smr01.freescale.net; FPR:; MLV:sfv; PTR:gate-az5.freescale.com; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0192E812EC Received-SPF: None (: freescale.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 192.88.158.246) smtp.mailfrom=guangyu.chen@freescale.com; X-OriginatorOrg: freescale.com Cc: tiwai@suse.de, alsa-devel@alsa-project.org, lgirdwood@gmail.com Subject: [alsa-devel] [PATCH 2/2] ASoC: fsl_spdif: Drop hard code in clk_get() for rxclk X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Then we will no longer need to change the name in dev_err() if one day we are going to change the DEFAULT_RXCLK_SRC. Signed-off-by: Nicolin Chen --- sound/soc/fsl/fsl_spdif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 4ce4ffa..29b5da2 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -1165,9 +1165,10 @@ static int fsl_spdif_probe(struct platform_device *pdev) } /* Select clock source for rx/tx clock */ - spdif_priv->rxclk = devm_clk_get(&pdev->dev, "rxtx1"); + sprintf(tmp, "rxtx%d", DEFAULT_RXCLK_SRC); + spdif_priv->rxclk = devm_clk_get(&pdev->dev, tmp); if (IS_ERR(spdif_priv->rxclk)) { - dev_err(&pdev->dev, "no rxtx1 clock in devicetree\n"); + dev_err(&pdev->dev, "no %s clock in devicetree\n", tmp); return PTR_ERR(spdif_priv->rxclk); } spdif_priv->rxclk_src = DEFAULT_RXCLK_SRC;