diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-05-28 13:22:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-30 07:33:40 -0400 |
commit | b7ede5dea0746611a75cf49cd3b2f64097c53ef5 (patch) | |
tree | 48684012ea133f61fbca09f660c3ada22355f8c1 /sound/soc/blackfin/bf5xx-i2s.c | |
parent | d65f63da22092176f3ffedcc013b801c7e7ba390 (diff) |
ASoC: blackfin: bf5xx-i2s: Use dev_{err, dbg} instead of pr_{error, debug}
Using dev_{err,dbg} instead of pr_{error,debug} makes it easier to recognize
which device created the message.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-i2s.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-i2s.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c index dd0c2a4f83a3..78411f266f60 100644 --- a/sound/soc/blackfin/bf5xx-i2s.c +++ b/sound/soc/blackfin/bf5xx-i2s.c | |||
@@ -74,7 +74,8 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
74 | ret = -EINVAL; | 74 | ret = -EINVAL; |
75 | break; | 75 | break; |
76 | default: | 76 | default: |
77 | printk(KERN_ERR "%s: Unknown DAI format type\n", __func__); | 77 | dev_err(cpu_dai->dev, "%s: Unknown DAI format type\n", |
78 | __func__); | ||
78 | ret = -EINVAL; | 79 | ret = -EINVAL; |
79 | break; | 80 | break; |
80 | } | 81 | } |
@@ -88,7 +89,8 @@ static int bf5xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai, | |||
88 | ret = -EINVAL; | 89 | ret = -EINVAL; |
89 | break; | 90 | break; |
90 | default: | 91 | default: |
91 | printk(KERN_ERR "%s: Unknown DAI master type\n", __func__); | 92 | dev_err(cpu_dai->dev, "%s: Unknown DAI master type\n", |
93 | __func__); | ||
92 | ret = -EINVAL; | 94 | ret = -EINVAL; |
93 | break; | 95 | break; |
94 | } | 96 | } |
@@ -141,14 +143,14 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream, | |||
141 | ret = sport_config_rx(sport_handle, bf5xx_i2s->rcr1, | 143 | ret = sport_config_rx(sport_handle, bf5xx_i2s->rcr1, |
142 | bf5xx_i2s->rcr2, 0, 0); | 144 | bf5xx_i2s->rcr2, 0, 0); |
143 | if (ret) { | 145 | if (ret) { |
144 | pr_err("SPORT is busy!\n"); | 146 | dev_err(dai->dev, "SPORT is busy!\n"); |
145 | return -EBUSY; | 147 | return -EBUSY; |
146 | } | 148 | } |
147 | 149 | ||
148 | ret = sport_config_tx(sport_handle, bf5xx_i2s->tcr1, | 150 | ret = sport_config_tx(sport_handle, bf5xx_i2s->tcr1, |
149 | bf5xx_i2s->tcr2, 0, 0); | 151 | bf5xx_i2s->tcr2, 0, 0); |
150 | if (ret) { | 152 | if (ret) { |
151 | pr_err("SPORT is busy!\n"); | 153 | dev_err(dai->dev, "SPORT is busy!\n"); |
152 | return -EBUSY; | 154 | return -EBUSY; |
153 | } | 155 | } |
154 | } | 156 | } |
@@ -162,7 +164,7 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream, | |||
162 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(dai); | 164 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(dai); |
163 | struct bf5xx_i2s_port *bf5xx_i2s = sport_handle->private_data; | 165 | struct bf5xx_i2s_port *bf5xx_i2s = sport_handle->private_data; |
164 | 166 | ||
165 | pr_debug("%s enter\n", __func__); | 167 | dev_dbg(dai->dev, "%s enter\n", __func__); |
166 | /* No active stream, SPORT is allowed to be configured again. */ | 168 | /* No active stream, SPORT is allowed to be configured again. */ |
167 | if (!dai->active) | 169 | if (!dai->active) |
168 | bf5xx_i2s->configured = 0; | 170 | bf5xx_i2s->configured = 0; |
@@ -173,7 +175,7 @@ static int bf5xx_i2s_suspend(struct snd_soc_dai *dai) | |||
173 | { | 175 | { |
174 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(dai); | 176 | struct sport_device *sport_handle = snd_soc_dai_get_drvdata(dai); |
175 | 177 | ||
176 | pr_debug("%s : sport %d\n", __func__, dai->id); | 178 | dev_dbg(dai->dev, "%s : sport %d\n", __func__, dai->id); |
177 | 179 | ||
178 | if (dai->capture_active) | 180 | if (dai->capture_active) |
179 | sport_rx_stop(sport_handle); | 181 | sport_rx_stop(sport_handle); |
@@ -188,19 +190,19 @@ static int bf5xx_i2s_resume(struct snd_soc_dai *dai) | |||
188 | struct bf5xx_i2s_port *bf5xx_i2s = sport_handle->private_data; | 190 | struct bf5xx_i2s_port *bf5xx_i2s = sport_handle->private_data; |
189 | int ret; | 191 | int ret; |
190 | 192 | ||
191 | pr_debug("%s : sport %d\n", __func__, dai->id); | 193 | dev_dbg(dai->dev, "%s : sport %d\n", __func__, dai->id); |
192 | 194 | ||
193 | ret = sport_config_rx(sport_handle, bf5xx_i2s->rcr1, | 195 | ret = sport_config_rx(sport_handle, bf5xx_i2s->rcr1, |
194 | bf5xx_i2s->rcr2, 0, 0); | 196 | bf5xx_i2s->rcr2, 0, 0); |
195 | if (ret) { | 197 | if (ret) { |
196 | pr_err("SPORT is busy!\n"); | 198 | dev_err(dai->dev, "SPORT is busy!\n"); |
197 | return -EBUSY; | 199 | return -EBUSY; |
198 | } | 200 | } |
199 | 201 | ||
200 | ret = sport_config_tx(sport_handle, bf5xx_i2s->tcr1, | 202 | ret = sport_config_tx(sport_handle, bf5xx_i2s->tcr1, |
201 | bf5xx_i2s->tcr2, 0, 0); | 203 | bf5xx_i2s->tcr2, 0, 0); |
202 | if (ret) { | 204 | if (ret) { |
203 | pr_err("SPORT is busy!\n"); | 205 | dev_err(dai->dev, "SPORT is busy!\n"); |
204 | return -EBUSY; | 206 | return -EBUSY; |
205 | } | 207 | } |
206 | 208 | ||
@@ -264,7 +266,7 @@ static int bf5xx_i2s_probe(struct platform_device *pdev) | |||
264 | ret = snd_soc_register_component(&pdev->dev, &bf5xx_i2s_component, | 266 | ret = snd_soc_register_component(&pdev->dev, &bf5xx_i2s_component, |
265 | &bf5xx_i2s_dai, 1); | 267 | &bf5xx_i2s_dai, 1); |
266 | if (ret) { | 268 | if (ret) { |
267 | pr_err("Failed to register DAI: %d\n", ret); | 269 | dev_err(&pdev->dev, "Failed to register DAI: %d\n", ret); |
268 | sport_done(sport_handle); | 270 | sport_done(sport_handle); |
269 | return ret; | 271 | return ret; |
270 | } | 272 | } |
@@ -276,7 +278,7 @@ static int bf5xx_i2s_remove(struct platform_device *pdev) | |||
276 | { | 278 | { |
277 | struct sport_device *sport_handle = platform_get_drvdata(pdev); | 279 | struct sport_device *sport_handle = platform_get_drvdata(pdev); |
278 | 280 | ||
279 | pr_debug("%s enter\n", __func__); | 281 | dev_dbg(&pdev->dev, "%s enter\n", __func__); |
280 | 282 | ||
281 | snd_soc_unregister_component(&pdev->dev); | 283 | snd_soc_unregister_component(&pdev->dev); |
282 | sport_done(sport_handle); | 284 | sport_done(sport_handle); |