From patchwork Thu Aug 4 13:38:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9263683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D05C36048F for ; Thu, 4 Aug 2016 13:43:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C10F128407 for ; Thu, 4 Aug 2016 13:43:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5B9B2840C; Thu, 4 Aug 2016 13:43:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3DDDE28407 for ; Thu, 4 Aug 2016 13:43:33 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVIuU-000815-Vh; Thu, 04 Aug 2016 13:42:06 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVIsG-0005ak-OC for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 13:39:50 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OBE013KD0GKDQE0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 22:39:37 +0900 (KST) X-AuditID: cbfee61a-f78ff6d000001462-8f-57a34599587b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 19.E8.05218.99543A75; Thu, 4 Aug 2016 22:39:37 +0900 (KST) Received: from AMDC1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OBE000Y20L4R530@mmp1.samsung.com>; Thu, 04 Aug 2016 22:39:37 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Subject: [PATCH 7/8] ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup Date: Thu, 04 Aug 2016 15:38:47 +0200 Message-id: <1470317928-25365-8-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1470317928-25365-1-git-send-email-s.nawrocki@samsung.com> References: <1470317928-25365-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t9jAd2ZrovDDfY/srK4cvEQk8XGGetZ LaY+fMJmcf78BnaLTY+vsVrMOL+PyeLwm3ZWB3aPDZ+b2Dw2repk89i8pN6jb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mr7O+cNW8EysYvXqp2wNjG1CXYycHBICJhJHO76wQNhiEhfurWfr YuTiEBJYyihx8Pk/RgjnF6PEx+v7mEGq2AQMJXqP9jGC2CJAHbfndILFmQWOMErsXcsOYgsL +Els7NkKNImDg0VAVeLfwQCQMK+Am8Sy+ZNYIZbJSZw8NpkVpIRTwF3ixRYPkLAQUMnXV8dY JzDyLmBkWMUokVqQXFCclJ5rmJdarlecmFtcmpeul5yfu4kRHFbPpHYwHtzlfohRgINRiYf3 gumicCHWxLLiytxDjBIczEoivL+dFocL8aYkVlalFuXHF5XmpBYfYpTmYFES5338f12YkEB6 YklqdmpqQWoRTJaJg1OqgfFwkZzTN+83BYLH9x+3dzjUPvGEtO+6x6EnLQwe+EoV3nztvmbr j6zw2VMOb9/hUu7CsTLv/2nRU2/ueu/K8VBVL3rIGfSpZXviig/TeA//K1hWwvz7tk6TyanP /2eHv/73Trv1n+o13uWVF5JYf2tvYHVk3FtyaJv3sRlTMy4LZLKqZOWsydBXYinOSDTUYi4q TgQA093jzScCAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160804_063949_158292_07764DC0 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, krzk@kernel.org, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Switch from pr_* to dev_* macros and drop some debug traces. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/s3c24xx_uda134x.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index a8102a7..7853fbe 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -64,17 +64,17 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) int ret = 0; mutex_lock(&clk_lock); - pr_debug("%s %d\n", __func__, clk_users); + if (clk_users == 0) { xtal = clk_get(rtd->dev, "xtal"); if (IS_ERR(xtal)) { - printk(KERN_ERR "%s cannot get xtal\n", __func__); + dev_err(rtd->dev, "%s cannot get xtal\n", __func__); ret = PTR_ERR(xtal); } else { pclk = clk_get(cpu_dai->dev, "iis"); if (IS_ERR(pclk)) { - printk(KERN_ERR "%s cannot get pclk\n", - __func__); + dev_err(rtd->dev, "%s cannot get pclk\n", + __func__); clk_put(xtal); ret = PTR_ERR(pclk); } @@ -100,8 +100,8 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); if (ret < 0) - printk(KERN_ERR "%s cannot set constraints\n", - __func__); + dev_err(rtd->dev, "%s cannot set constraints\n", + __func__); #endif } return ret; @@ -110,7 +110,6 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream) { mutex_lock(&clk_lock); - pr_debug("%s %d\n", __func__, clk_users); clk_users -= 1; if (clk_users == 0) { clk_put(xtal); @@ -157,18 +156,19 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream, clk_source = S3C24XX_CLKSRC_PCLK; div = bi % 33; } - pr_debug("%s desired rate %lu, %d\n", __func__, rate, bi); + + dev_dbg(rtd->dev, "%s desired rate %lu, %d\n", __func__, rate, bi); clk = (fs_mode == S3C2410_IISMOD_384FS ? 384 : 256) * rate; - pr_debug("%s will use: %s %s %d sysclk %d err %ld\n", __func__, - fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS", - clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK", - div, clk, err); + + dev_dbg(rtd->dev, "%s will use: %s %s %d sysclk %d err %ld\n", __func__, + fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS", + clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK", + div, clk, err); if ((err * 100 / rate) > 5) { - printk(KERN_ERR "S3C24XX_UDA134X: effective frequency " - "too different from desired (%ld%%)\n", - err * 100 / rate); + dev_err(rtd->dev, "effective frequency too different " + "from desired (%ld%%)\n", err * 100 / rate); return -EINVAL; }