1 From b3aa9fe657c5e96659d64e6b008e025b433616ad Mon Sep 17 00:00:00 2001
2 From: Dong Aisheng <aisheng.dong@nxp.com>
3 Date: Fri, 16 Aug 2019 18:01:53 +0800
4 Subject: [PATCH] Revert "ASoC: Remove dev_err() usage after
7 This reverts commit cf9441adb1a35506d7606866c382b9d8614169b5.
9 sound/soc/atmel/atmel-classd.c | 7 +++++--
10 sound/soc/atmel/atmel-pdmic.c | 7 +++++--
11 sound/soc/bcm/cygnus-ssp.c | 7 +++++--
12 sound/soc/codecs/msm8916-wcd-analog.c | 12 +++++++++---
13 sound/soc/codecs/twl6040.c | 4 +++-
14 sound/soc/fsl/fsl_asrc.c | 4 +++-
15 sound/soc/fsl/fsl_esai.c | 4 +++-
16 sound/soc/fsl/fsl_sai.c | 4 +++-
17 sound/soc/fsl/fsl_spdif.c | 4 +++-
18 sound/soc/fsl/fsl_ssi.c | 4 +++-
19 sound/soc/fsl/imx-ssi.c | 4 +++-
20 sound/soc/kirkwood/kirkwood-i2s.c | 4 +++-
21 sound/soc/mediatek/common/mtk-btcvsd.c | 4 +++-
22 sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 4 +++-
23 sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 4 +++-
24 sound/soc/mxs/mxs-saif.c | 8 ++++++--
25 sound/soc/qcom/lpass-platform.c | 5 ++++-
26 sound/soc/sof/intel/bdw.c | 5 ++++-
27 sound/soc/sof/intel/byt.c | 5 ++++-
28 sound/soc/sprd/sprd-mcdt.c | 4 +++-
29 sound/soc/sti/sti_uniperif.c | 4 +++-
30 sound/soc/stm/stm32_i2s.c | 5 ++++-
31 sound/soc/stm/stm32_sai.c | 4 +++-
32 sound/soc/stm/stm32_spdifrx.c | 4 +++-
33 sound/soc/sunxi/sun4i-i2s.c | 4 +++-
34 sound/soc/uniphier/aio-dma.c | 4 +++-
35 sound/soc/xilinx/xlnx_formatter_pcm.c | 2 ++
36 sound/soc/xtensa/xtfpga-i2s.c | 1 +
37 28 files changed, 100 insertions(+), 32 deletions(-)
39 --- a/sound/soc/atmel/atmel-classd.c
40 +++ b/sound/soc/atmel/atmel-classd.c
41 @@ -571,8 +571,11 @@ static int atmel_classd_probe(struct pla
44 dd->irq = platform_get_irq(pdev, 0);
49 + dev_err(dev, "failed to could not get irq: %d\n", ret);
53 dd->pclk = devm_clk_get(dev, "pclk");
54 if (IS_ERR(dd->pclk)) {
55 --- a/sound/soc/atmel/atmel-pdmic.c
56 +++ b/sound/soc/atmel/atmel-pdmic.c
57 @@ -612,8 +612,11 @@ static int atmel_pdmic_probe(struct plat
60 dd->irq = platform_get_irq(pdev, 0);
65 + dev_err(dev, "failed to get irq: %d\n", ret);
69 dd->pclk = devm_clk_get(dev, "pclk");
70 if (IS_ERR(dd->pclk)) {
71 --- a/sound/soc/bcm/cygnus-ssp.c
72 +++ b/sound/soc/bcm/cygnus-ssp.c
73 @@ -1342,8 +1342,11 @@ static int cygnus_ssp_probe(struct platf
76 cygaud->irq_num = platform_get_irq(pdev, 0);
77 - if (cygaud->irq_num <= 0)
78 - return cygaud->irq_num;
79 + if (cygaud->irq_num <= 0) {
80 + dev_err(dev, "platform_get_irq failed\n");
81 + err = cygaud->irq_num;
85 err = audio_clk_init(pdev, cygaud);
87 --- a/sound/soc/codecs/msm8916-wcd-analog.c
88 +++ b/sound/soc/codecs/msm8916-wcd-analog.c
89 @@ -1195,8 +1195,10 @@ static int pm8916_wcd_analog_spmi_probe(
92 irq = platform_get_irq_byname(pdev, "mbhc_switch_int");
95 + dev_err(dev, "failed to get mbhc switch irq\n");
99 ret = devm_request_threaded_irq(dev, irq, NULL,
100 pm8916_mbhc_switch_irq_handler,
101 @@ -1208,8 +1210,10 @@ static int pm8916_wcd_analog_spmi_probe(
103 if (priv->mbhc_btn_enabled) {
104 irq = platform_get_irq_byname(pdev, "mbhc_but_press_det");
107 + dev_err(dev, "failed to get button press irq\n");
111 ret = devm_request_threaded_irq(dev, irq, NULL,
112 mbhc_btn_press_irq_handler,
113 @@ -1220,8 +1224,10 @@ static int pm8916_wcd_analog_spmi_probe(
114 dev_err(dev, "cannot request mbhc button press irq\n");
116 irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det");
119 + dev_err(dev, "failed to get button release irq\n");
123 ret = devm_request_threaded_irq(dev, irq, NULL,
124 mbhc_btn_release_irq_handler,
125 --- a/sound/soc/codecs/twl6040.c
126 +++ b/sound/soc/codecs/twl6040.c
127 @@ -1108,8 +1108,10 @@ static int twl6040_probe(struct snd_soc_
128 priv->component = component;
130 priv->plug_irq = platform_get_irq(pdev, 0);
131 - if (priv->plug_irq < 0)
132 + if (priv->plug_irq < 0) {
133 + dev_err(component->dev, "invalid irq: %d\n", priv->plug_irq);
134 return priv->plug_irq;
137 INIT_DELAYED_WORK(&priv->hs_jack.work, twl6040_accessory_work);
139 --- a/sound/soc/fsl/fsl_asrc.c
140 +++ b/sound/soc/fsl/fsl_asrc.c
141 @@ -885,8 +885,10 @@ static int fsl_asrc_probe(struct platfor
144 irq = platform_get_irq(pdev, 0);
147 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
151 ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0,
152 dev_name(&pdev->dev), asrc_priv);
153 --- a/sound/soc/fsl/fsl_esai.c
154 +++ b/sound/soc/fsl/fsl_esai.c
155 @@ -977,8 +977,10 @@ static int fsl_esai_probe(struct platfor
156 PTR_ERR(esai_priv->spbaclk));
158 irq = platform_get_irq(pdev, 0);
161 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
165 ret = devm_request_irq(&pdev->dev, irq, esai_isr, 0,
166 esai_priv->name, esai_priv);
167 --- a/sound/soc/fsl/fsl_sai.c
168 +++ b/sound/soc/fsl/fsl_sai.c
169 @@ -831,8 +831,10 @@ static int fsl_sai_probe(struct platform
172 irq = platform_get_irq(pdev, 0);
175 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
179 ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
181 --- a/sound/soc/fsl/fsl_spdif.c
182 +++ b/sound/soc/fsl/fsl_spdif.c
183 @@ -1248,8 +1248,10 @@ static int fsl_spdif_probe(struct platfo
186 irq = platform_get_irq(pdev, 0);
189 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
193 ret = devm_request_irq(&pdev->dev, irq, spdif_isr, 0,
194 dev_name(&pdev->dev), spdif_priv);
195 --- a/sound/soc/fsl/fsl_ssi.c
196 +++ b/sound/soc/fsl/fsl_ssi.c
197 @@ -1515,8 +1515,10 @@ static int fsl_ssi_probe(struct platform
200 ssi->irq = platform_get_irq(pdev, 0);
202 + if (ssi->irq < 0) {
203 + dev_err(dev, "no irq for node %s\n", pdev->name);
207 /* Set software limitations for synchronous mode except AC97 */
208 if (ssi->synchronous && !fsl_ssi_is_ac97(ssi)) {
209 --- a/sound/soc/fsl/imx-ssi.c
210 +++ b/sound/soc/fsl/imx-ssi.c
211 @@ -520,8 +520,10 @@ static int imx_ssi_probe(struct platform
214 ssi->irq = platform_get_irq(pdev, 0);
216 + if (ssi->irq < 0) {
217 + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq);
221 ssi->clk = devm_clk_get(&pdev->dev, NULL);
222 if (IS_ERR(ssi->clk)) {
223 --- a/sound/soc/kirkwood/kirkwood-i2s.c
224 +++ b/sound/soc/kirkwood/kirkwood-i2s.c
225 @@ -537,8 +537,10 @@ static int kirkwood_i2s_dev_probe(struct
226 return PTR_ERR(priv->io);
228 priv->irq = platform_get_irq(pdev, 0);
230 + if (priv->irq < 0) {
231 + dev_err(&pdev->dev, "platform_get_irq failed: %d\n", priv->irq);
236 priv->burst = 128; /* might be 32 or 128 */
237 --- a/sound/soc/mediatek/common/mtk-btcvsd.c
238 +++ b/sound/soc/mediatek/common/mtk-btcvsd.c
239 @@ -1335,8 +1335,10 @@ static int mtk_btcvsd_snd_probe(struct p
242 irq_id = platform_get_irq(pdev, 0);
245 + dev_err(dev, "%pOFn no irq found\n", dev->of_node);
246 return irq_id < 0 ? irq_id : -ENXIO;
249 ret = devm_request_irq(dev, irq_id, mtk_btcvsd_snd_irq_handler,
250 IRQF_TRIGGER_LOW, "BTCVSD_ISR_Handle",
251 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
252 +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
253 @@ -1350,8 +1350,10 @@ static int mt2701_afe_pcm_dev_probe(stru
256 irq_id = platform_get_irq_byname(pdev, "asys");
259 + dev_err(dev, "unable to get ASYS IRQ\n");
263 ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
264 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
265 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
266 +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
267 @@ -1074,8 +1074,10 @@ static int mt8173_afe_pcm_dev_probe(stru
268 afe->dev = &pdev->dev;
270 irq_id = platform_get_irq(pdev, 0);
273 + dev_err(afe->dev, "np %pOFn no irq\n", afe->dev->of_node);
274 return irq_id < 0 ? irq_id : -ENXIO;
276 ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
277 0, "Afe_ISR_Handle", (void *)afe);
279 --- a/sound/soc/mxs/mxs-saif.c
280 +++ b/sound/soc/mxs/mxs-saif.c
281 @@ -790,8 +790,12 @@ static int mxs_saif_probe(struct platfor
282 return PTR_ERR(saif->base);
284 irq = platform_get_irq(pdev, 0);
289 + dev_err(&pdev->dev, "failed to get irq resource: %d\n",
294 saif->dev = &pdev->dev;
295 ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
296 --- a/sound/soc/qcom/lpass-platform.c
297 +++ b/sound/soc/qcom/lpass-platform.c
298 @@ -568,8 +568,11 @@ int asoc_qcom_lpass_platform_register(st
301 drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif");
302 - if (drvdata->lpaif_irq < 0)
303 + if (drvdata->lpaif_irq < 0) {
304 + dev_err(&pdev->dev, "error getting irq handle: %d\n",
305 + drvdata->lpaif_irq);
309 /* ensure audio hardware is disabled */
310 ret = regmap_write(drvdata->lpaif_map,
311 --- a/sound/soc/sof/intel/bdw.c
312 +++ b/sound/soc/sof/intel/bdw.c
313 @@ -483,8 +483,11 @@ static int bdw_probe(struct snd_sof_dev
315 /* register our IRQ */
316 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
317 - if (sdev->ipc_irq < 0)
318 + if (sdev->ipc_irq < 0) {
319 + dev_err(sdev->dev, "error: failed to get IRQ at index %d\n",
320 + desc->irqindex_host_ipc);
321 return sdev->ipc_irq;
324 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq);
325 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq,
326 --- a/sound/soc/sof/intel/byt.c
327 +++ b/sound/soc/sof/intel/byt.c
328 @@ -600,8 +600,11 @@ static int byt_acpi_probe(struct snd_sof
330 /* register our IRQ */
331 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
332 - if (sdev->ipc_irq < 0)
333 + if (sdev->ipc_irq < 0) {
334 + dev_err(sdev->dev, "error: failed to get IRQ at index %d\n",
335 + desc->irqindex_host_ipc);
336 return sdev->ipc_irq;
339 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq);
340 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq,
341 --- a/sound/soc/sprd/sprd-mcdt.c
342 +++ b/sound/soc/sprd/sprd-mcdt.c
343 @@ -959,8 +959,10 @@ static int sprd_mcdt_probe(struct platfo
344 platform_set_drvdata(pdev, mcdt);
346 irq = platform_get_irq(pdev, 0);
349 + dev_err(&pdev->dev, "Failed to get MCDT interrupt\n");
353 ret = devm_request_irq(&pdev->dev, irq, sprd_mcdt_irq_handler,
354 0, "sprd-mcdt", mcdt);
355 --- a/sound/soc/sti/sti_uniperif.c
356 +++ b/sound/soc/sti/sti_uniperif.c
357 @@ -426,8 +426,10 @@ static int sti_uniperiph_cpu_dai_of(stru
358 UNIPERIF_FIFO_DATA_OFFSET(uni);
360 uni->irq = platform_get_irq(priv->pdev, 0);
362 + if (uni->irq < 0) {
363 + dev_err(dev, "Failed to get IRQ resource\n");
367 uni->type = dev_data->type;
369 --- a/sound/soc/stm/stm32_i2s.c
370 +++ b/sound/soc/stm/stm32_i2s.c
371 @@ -855,8 +855,11 @@ static int stm32_i2s_parse_dt(struct pla
374 irq = platform_get_irq(pdev, 0);
377 + if (irq != -EPROBE_DEFER)
378 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
382 ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT,
383 dev_name(&pdev->dev), i2s);
384 --- a/sound/soc/stm/stm32_sai.c
385 +++ b/sound/soc/stm/stm32_sai.c
386 @@ -193,8 +193,10 @@ static int stm32_sai_probe(struct platfo
389 sai->irq = platform_get_irq(pdev, 0);
391 + if (sai->irq < 0) {
392 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
397 rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
398 --- a/sound/soc/stm/stm32_spdifrx.c
399 +++ b/sound/soc/stm/stm32_spdifrx.c
400 @@ -920,8 +920,10 @@ static int stm32_spdifrx_parse_of(struct
403 spdifrx->irq = platform_get_irq(pdev, 0);
404 - if (spdifrx->irq < 0)
405 + if (spdifrx->irq < 0) {
406 + dev_err(&pdev->dev, "No irq for node %s\n", pdev->name);
412 --- a/sound/soc/sunxi/sun4i-i2s.c
413 +++ b/sound/soc/sunxi/sun4i-i2s.c
414 @@ -1198,8 +1198,10 @@ static int sun4i_i2s_probe(struct platfo
415 return PTR_ERR(regs);
417 irq = platform_get_irq(pdev, 0);
420 + dev_err(&pdev->dev, "Can't retrieve our interrupt\n");
424 i2s->variant = of_device_get_match_data(&pdev->dev);
426 --- a/sound/soc/uniphier/aio-dma.c
427 +++ b/sound/soc/uniphier/aio-dma.c
428 @@ -289,8 +289,10 @@ int uniphier_aiodma_soc_register_platfor
429 return PTR_ERR(chip->regmap);
431 irq = platform_get_irq(pdev, 0);
434 + dev_err(dev, "Could not get irq.\n");
438 ret = devm_request_irq(dev, irq, aiodma_irq,
439 IRQF_SHARED, dev_name(dev), pdev);
440 --- a/sound/soc/xilinx/xlnx_formatter_pcm.c
441 +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
442 @@ -613,6 +613,7 @@ static int xlnx_formatter_pcm_probe(stru
443 aud_drv_data->mm2s_irq = platform_get_irq_byname(pdev,
445 if (aud_drv_data->mm2s_irq < 0) {
446 + dev_err(dev, "xlnx audio mm2s irq resource failed\n");
447 ret = aud_drv_data->mm2s_irq;
450 @@ -639,6 +640,7 @@ static int xlnx_formatter_pcm_probe(stru
451 aud_drv_data->s2mm_irq = platform_get_irq_byname(pdev,
453 if (aud_drv_data->s2mm_irq < 0) {
454 + dev_err(dev, "xlnx audio s2mm irq resource failed\n");
455 ret = aud_drv_data->s2mm_irq;
458 --- a/sound/soc/xtensa/xtfpga-i2s.c
459 +++ b/sound/soc/xtensa/xtfpga-i2s.c
460 @@ -570,6 +570,7 @@ static int xtfpga_i2s_probe(struct platf
462 irq = platform_get_irq(pdev, 0);
464 + dev_err(&pdev->dev, "No IRQ resource\n");