From patchwork Fri Aug 5 09:47:09 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: 9265107 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 F1BEA6048B for ; Fri, 5 Aug 2016 09:47:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1B2928426 for ; Fri, 5 Aug 2016 09:47:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5FDD2842D; Fri, 5 Aug 2016 09:47:40 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3460C28426 for ; Fri, 5 Aug 2016 09:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934907AbcHEJrj (ORCPT ); Fri, 5 Aug 2016 05:47:39 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:48227 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934875AbcHEJri (ORCPT ); Fri, 5 Aug 2016 05:47:38 -0400 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OBF00I10KJBMJ30@mailout4.samsung.com> for linux-samsung-soc@vger.kernel.org; Fri, 05 Aug 2016 18:47:35 +0900 (KST) X-AuditID: cbfee61b-f79466d000001e3c-69-57a460b74b49 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id C2.06.07740.7B064A75; Fri, 5 Aug 2016 02:47:35 -0700 (MST) 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 <0OBF00LBUKIWLZ60@mmp1.samsung.com>; Fri, 05 Aug 2016 18:47:35 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, b.zolnierkie@samsung.com, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki Subject: [PATCH RESEND 7/8] ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup Date: Fri, 05 Aug 2016 11:47:09 +0200 Message-id: <1470390429-30902-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrAJMWRmVeSWpSXmKPExsVy+t9jAd3tCUvCDZbP07W4cvEQk8XGGetZ LaY+fMJmMeP8PiaLw2/aWR1YPTZ8bmLz2LSqk82jb8sqRo/Pm+QCWKK4bFJSczLLUov07RK4 MrpW7GErWCRe0bTsDGMD41ahLkZODgkBE4l5B2ezQthiEhfurWfrYuTiEBJYyiix8OsbFgjn F6PEk8PTmECq2AQMJXqP9jGC2CJAHbfndDKDFDELdDNKfG1ZADZKWCBc4tjbm0ANHBwsAqoS d6dygIR5BdwkTv8+xwixTU7i5LHJrBMYuRcwMqxilEgtSC4oTkrPNcpLLdcrTswtLs1L10vO z93ECA6HZ9I7GA/vcj/EKMDBqMTDqxC7OFyINbGsuDL3EKMEB7OSCO+9+CXhQrwpiZVVqUX5 8UWlOanFhxilOViUxHkf/18XJiSQnliSmp2aWpBaBJNl4uCUamAsrW2/flGXvX2q2JqY6dli l+dftGRcVVL643q/7ocQtbKA72d5JkX/rprD8OeLS8S+9QwLE+/tub1HTGXrgrfT6pYu5Gf0 +P/houOlgNT5nytV/s/i/vih8dyke3FfRH7YbV92LjXu2IV/omoPbk52drfj9js/f597oEPK oR12c7R8nOp+rowNVGIpzkg01GIuKk4EAOOQzecDAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Switch from pr_* to dev_* macros and drop some debug traces. Signed-off-by: Sylwester Nawrocki --- Rebased onto topic/samsung branch. sound/soc/samsung/s3c24xx_uda134x.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 13e52fb..1619e76 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -62,18 +62,18 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) #endif 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(&s3c24xx_uda134x_snd_device->dev, "pclk"); 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); } @@ -99,8 +99,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; @@ -109,7 +109,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); @@ -156,18 +155,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; }