diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-08-05 05:47:09 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-08-08 06:55:20 -0400 |
commit | 45ef4969d68f1837649ff3d8cdc5b804fa66df42 (patch) | |
tree | c1e24ae5faf167a734340c7445e49c02e5c49bbb /sound | |
parent | 28405212b5f972c8a9f666a5bcd1abdcb4a5dd5a (diff) |
ASoC: samsung: s3c24xx_uda134x: debug/error trace cleanup
Switch from pr_* to dev_* macros and drop some debug traces.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/samsung/s3c24xx_uda134x.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index 13e52fb7b631..1619e762e635 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) | |||
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | mutex_lock(&clk_lock); | 64 | mutex_lock(&clk_lock); |
65 | pr_debug("%s %d\n", __func__, clk_users); | 65 | |
66 | if (clk_users == 0) { | 66 | if (clk_users == 0) { |
67 | xtal = clk_get(rtd->dev, "xtal"); | 67 | xtal = clk_get(rtd->dev, "xtal"); |
68 | if (IS_ERR(xtal)) { | 68 | if (IS_ERR(xtal)) { |
69 | printk(KERN_ERR "%s cannot get xtal\n", __func__); | 69 | dev_err(rtd->dev, "%s cannot get xtal\n", __func__); |
70 | ret = PTR_ERR(xtal); | 70 | ret = PTR_ERR(xtal); |
71 | } else { | 71 | } else { |
72 | pclk = clk_get(&s3c24xx_uda134x_snd_device->dev, | 72 | pclk = clk_get(&s3c24xx_uda134x_snd_device->dev, |
73 | "pclk"); | 73 | "pclk"); |
74 | if (IS_ERR(pclk)) { | 74 | if (IS_ERR(pclk)) { |
75 | printk(KERN_ERR "%s cannot get pclk\n", | 75 | dev_err(rtd->dev, "%s cannot get pclk\n", |
76 | __func__); | 76 | __func__); |
77 | clk_put(xtal); | 77 | clk_put(xtal); |
78 | ret = PTR_ERR(pclk); | 78 | ret = PTR_ERR(pclk); |
79 | } | 79 | } |
@@ -99,8 +99,8 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) | |||
99 | SNDRV_PCM_HW_PARAM_RATE, | 99 | SNDRV_PCM_HW_PARAM_RATE, |
100 | &hw_constraints_rates); | 100 | &hw_constraints_rates); |
101 | if (ret < 0) | 101 | if (ret < 0) |
102 | printk(KERN_ERR "%s cannot set constraints\n", | 102 | dev_err(rtd->dev, "%s cannot set constraints\n", |
103 | __func__); | 103 | __func__); |
104 | #endif | 104 | #endif |
105 | } | 105 | } |
106 | return ret; | 106 | return ret; |
@@ -109,7 +109,6 @@ static int s3c24xx_uda134x_startup(struct snd_pcm_substream *substream) | |||
109 | static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream) | 109 | static void s3c24xx_uda134x_shutdown(struct snd_pcm_substream *substream) |
110 | { | 110 | { |
111 | mutex_lock(&clk_lock); | 111 | mutex_lock(&clk_lock); |
112 | pr_debug("%s %d\n", __func__, clk_users); | ||
113 | clk_users -= 1; | 112 | clk_users -= 1; |
114 | if (clk_users == 0) { | 113 | if (clk_users == 0) { |
115 | clk_put(xtal); | 114 | clk_put(xtal); |
@@ -156,18 +155,19 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream, | |||
156 | clk_source = S3C24XX_CLKSRC_PCLK; | 155 | clk_source = S3C24XX_CLKSRC_PCLK; |
157 | div = bi % 33; | 156 | div = bi % 33; |
158 | } | 157 | } |
159 | pr_debug("%s desired rate %lu, %d\n", __func__, rate, bi); | 158 | |
159 | dev_dbg(rtd->dev, "%s desired rate %lu, %d\n", __func__, rate, bi); | ||
160 | 160 | ||
161 | clk = (fs_mode == S3C2410_IISMOD_384FS ? 384 : 256) * rate; | 161 | clk = (fs_mode == S3C2410_IISMOD_384FS ? 384 : 256) * rate; |
162 | pr_debug("%s will use: %s %s %d sysclk %d err %ld\n", __func__, | 162 | |
163 | fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS", | 163 | dev_dbg(rtd->dev, "%s will use: %s %s %d sysclk %d err %ld\n", __func__, |
164 | clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK", | 164 | fs_mode == S3C2410_IISMOD_384FS ? "384FS" : "256FS", |
165 | div, clk, err); | 165 | clk_source == S3C24XX_CLKSRC_MPLL ? "MPLLin" : "PCLK", |
166 | div, clk, err); | ||
166 | 167 | ||
167 | if ((err * 100 / rate) > 5) { | 168 | if ((err * 100 / rate) > 5) { |
168 | printk(KERN_ERR "S3C24XX_UDA134X: effective frequency " | 169 | dev_err(rtd->dev, "effective frequency too different " |
169 | "too different from desired (%ld%%)\n", | 170 | "from desired (%ld%%)\n", err * 100 / rate); |
170 | err * 100 / rate); | ||
171 | return -EINVAL; | 171 | return -EINVAL; |
172 | } | 172 | } |
173 | 173 | ||