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 @@ -1196,6 +1196,7 @@ static int pm8916_wcd_analog_spmi_probe(
91 irq = platform_get_irq_byname(pdev, "mbhc_switch_int");
93 + dev_err(dev, "failed to get mbhc switch irq\n");
97 @@ -1211,6 +1212,7 @@ static int pm8916_wcd_analog_spmi_probe(
98 if (priv->mbhc_btn_enabled) {
99 irq = platform_get_irq_byname(pdev, "mbhc_but_press_det");
101 + dev_err(dev, "failed to get button press irq\n");
103 goto err_disable_clk;
105 @@ -1225,6 +1227,7 @@ static int pm8916_wcd_analog_spmi_probe(
107 irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det");
109 + dev_err(dev, "failed to get button release irq\n");
111 goto err_disable_clk;
113 --- a/sound/soc/codecs/twl6040.c
114 +++ b/sound/soc/codecs/twl6040.c
115 @@ -1108,8 +1108,10 @@ static int twl6040_probe(struct snd_soc_
116 priv->component = component;
118 priv->plug_irq = platform_get_irq(pdev, 0);
119 - if (priv->plug_irq < 0)
120 + if (priv->plug_irq < 0) {
121 + dev_err(component->dev, "invalid irq: %d\n", priv->plug_irq);
122 return priv->plug_irq;
125 INIT_DELAYED_WORK(&priv->hs_jack.work, twl6040_accessory_work);
127 --- a/sound/soc/fsl/fsl_asrc.c
128 +++ b/sound/soc/fsl/fsl_asrc.c
129 @@ -885,8 +885,10 @@ static int fsl_asrc_probe(struct platfor
132 irq = platform_get_irq(pdev, 0);
135 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
139 ret = devm_request_irq(&pdev->dev, irq, fsl_asrc_isr, 0,
140 dev_name(&pdev->dev), asrc_priv);
141 --- a/sound/soc/fsl/fsl_esai.c
142 +++ b/sound/soc/fsl/fsl_esai.c
143 @@ -979,8 +979,10 @@ static int fsl_esai_probe(struct platfor
144 PTR_ERR(esai_priv->spbaclk));
146 irq = platform_get_irq(pdev, 0);
149 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
153 ret = devm_request_irq(&pdev->dev, irq, esai_isr, 0,
154 esai_priv->name, esai_priv);
155 --- a/sound/soc/fsl/fsl_sai.c
156 +++ b/sound/soc/fsl/fsl_sai.c
157 @@ -831,8 +831,10 @@ static int fsl_sai_probe(struct platform
160 irq = platform_get_irq(pdev, 0);
163 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
167 ret = devm_request_irq(&pdev->dev, irq, fsl_sai_isr, 0, np->name, sai);
169 --- a/sound/soc/fsl/fsl_spdif.c
170 +++ b/sound/soc/fsl/fsl_spdif.c
171 @@ -1248,8 +1248,10 @@ static int fsl_spdif_probe(struct platfo
174 irq = platform_get_irq(pdev, 0);
177 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
181 ret = devm_request_irq(&pdev->dev, irq, spdif_isr, 0,
182 dev_name(&pdev->dev), spdif_priv);
183 --- a/sound/soc/fsl/fsl_ssi.c
184 +++ b/sound/soc/fsl/fsl_ssi.c
185 @@ -1517,8 +1517,10 @@ static int fsl_ssi_probe(struct platform
188 ssi->irq = platform_get_irq(pdev, 0);
190 + if (ssi->irq < 0) {
191 + dev_err(dev, "no irq for node %s\n", pdev->name);
195 /* Set software limitations for synchronous mode except AC97 */
196 if (ssi->synchronous && !fsl_ssi_is_ac97(ssi)) {
197 --- a/sound/soc/fsl/imx-ssi.c
198 +++ b/sound/soc/fsl/imx-ssi.c
199 @@ -520,8 +520,10 @@ static int imx_ssi_probe(struct platform
202 ssi->irq = platform_get_irq(pdev, 0);
204 + if (ssi->irq < 0) {
205 + dev_err(&pdev->dev, "Failed to get IRQ: %d\n", ssi->irq);
209 ssi->clk = devm_clk_get(&pdev->dev, NULL);
210 if (IS_ERR(ssi->clk)) {
211 --- a/sound/soc/kirkwood/kirkwood-i2s.c
212 +++ b/sound/soc/kirkwood/kirkwood-i2s.c
213 @@ -537,8 +537,10 @@ static int kirkwood_i2s_dev_probe(struct
214 return PTR_ERR(priv->io);
216 priv->irq = platform_get_irq(pdev, 0);
218 + if (priv->irq < 0) {
219 + dev_err(&pdev->dev, "platform_get_irq failed: %d\n", priv->irq);
224 priv->burst = 128; /* might be 32 or 128 */
225 --- a/sound/soc/mediatek/common/mtk-btcvsd.c
226 +++ b/sound/soc/mediatek/common/mtk-btcvsd.c
227 @@ -1335,8 +1335,10 @@ static int mtk_btcvsd_snd_probe(struct p
230 irq_id = platform_get_irq(pdev, 0);
233 + dev_err(dev, "%pOFn no irq found\n", dev->of_node);
234 return irq_id < 0 ? irq_id : -ENXIO;
237 ret = devm_request_irq(dev, irq_id, mtk_btcvsd_snd_irq_handler,
238 IRQF_TRIGGER_LOW, "BTCVSD_ISR_Handle",
239 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
240 +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
241 @@ -1350,8 +1350,10 @@ static int mt2701_afe_pcm_dev_probe(stru
244 irq_id = platform_get_irq_byname(pdev, "asys");
247 + dev_err(dev, "unable to get ASYS IRQ\n");
251 ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
252 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
253 --- a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
254 +++ b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c
255 @@ -1074,8 +1074,10 @@ static int mt8173_afe_pcm_dev_probe(stru
256 afe->dev = &pdev->dev;
258 irq_id = platform_get_irq(pdev, 0);
261 + dev_err(afe->dev, "np %pOFn no irq\n", afe->dev->of_node);
262 return irq_id < 0 ? irq_id : -ENXIO;
264 ret = devm_request_irq(afe->dev, irq_id, mt8173_afe_irq_handler,
265 0, "Afe_ISR_Handle", (void *)afe);
267 --- a/sound/soc/mxs/mxs-saif.c
268 +++ b/sound/soc/mxs/mxs-saif.c
269 @@ -794,8 +794,12 @@ static int mxs_saif_probe(struct platfor
270 return PTR_ERR(saif->base);
272 irq = platform_get_irq(pdev, 0);
277 + dev_err(&pdev->dev, "failed to get irq resource: %d\n",
282 saif->dev = &pdev->dev;
283 ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0,
284 --- a/sound/soc/qcom/lpass-platform.c
285 +++ b/sound/soc/qcom/lpass-platform.c
286 @@ -568,8 +568,11 @@ int asoc_qcom_lpass_platform_register(st
289 drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif");
290 - if (drvdata->lpaif_irq < 0)
291 + if (drvdata->lpaif_irq < 0) {
292 + dev_err(&pdev->dev, "error getting irq handle: %d\n",
293 + drvdata->lpaif_irq);
297 /* ensure audio hardware is disabled */
298 ret = regmap_write(drvdata->lpaif_map,
299 --- a/sound/soc/sof/intel/bdw.c
300 +++ b/sound/soc/sof/intel/bdw.c
301 @@ -483,8 +483,11 @@ static int bdw_probe(struct snd_sof_dev
303 /* register our IRQ */
304 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
305 - if (sdev->ipc_irq < 0)
306 + if (sdev->ipc_irq < 0) {
307 + dev_err(sdev->dev, "error: failed to get IRQ at index %d\n",
308 + desc->irqindex_host_ipc);
309 return sdev->ipc_irq;
312 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq);
313 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq,
314 --- a/sound/soc/sof/intel/byt.c
315 +++ b/sound/soc/sof/intel/byt.c
316 @@ -600,8 +600,11 @@ static int byt_acpi_probe(struct snd_sof
318 /* register our IRQ */
319 sdev->ipc_irq = platform_get_irq(pdev, desc->irqindex_host_ipc);
320 - if (sdev->ipc_irq < 0)
321 + if (sdev->ipc_irq < 0) {
322 + dev_err(sdev->dev, "error: failed to get IRQ at index %d\n",
323 + desc->irqindex_host_ipc);
324 return sdev->ipc_irq;
327 dev_dbg(sdev->dev, "using IRQ %d\n", sdev->ipc_irq);
328 ret = devm_request_threaded_irq(sdev->dev, sdev->ipc_irq,
329 --- a/sound/soc/sprd/sprd-mcdt.c
330 +++ b/sound/soc/sprd/sprd-mcdt.c
331 @@ -959,8 +959,10 @@ static int sprd_mcdt_probe(struct platfo
332 platform_set_drvdata(pdev, mcdt);
334 irq = platform_get_irq(pdev, 0);
337 + dev_err(&pdev->dev, "Failed to get MCDT interrupt\n");
341 ret = devm_request_irq(&pdev->dev, irq, sprd_mcdt_irq_handler,
342 0, "sprd-mcdt", mcdt);
343 --- a/sound/soc/sti/sti_uniperif.c
344 +++ b/sound/soc/sti/sti_uniperif.c
345 @@ -426,8 +426,10 @@ static int sti_uniperiph_cpu_dai_of(stru
346 UNIPERIF_FIFO_DATA_OFFSET(uni);
348 uni->irq = platform_get_irq(priv->pdev, 0);
350 + if (uni->irq < 0) {
351 + dev_err(dev, "Failed to get IRQ resource\n");
355 uni->type = dev_data->type;
357 --- a/sound/soc/stm/stm32_i2s.c
358 +++ b/sound/soc/stm/stm32_i2s.c
359 @@ -855,8 +855,11 @@ static int stm32_i2s_parse_dt(struct pla
362 irq = platform_get_irq(pdev, 0);
365 + if (irq != -EPROBE_DEFER)
366 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
370 ret = devm_request_irq(&pdev->dev, irq, stm32_i2s_isr, IRQF_ONESHOT,
371 dev_name(&pdev->dev), i2s);
372 --- a/sound/soc/stm/stm32_sai.c
373 +++ b/sound/soc/stm/stm32_sai.c
374 @@ -193,8 +193,10 @@ static int stm32_sai_probe(struct platfo
377 sai->irq = platform_get_irq(pdev, 0);
379 + if (sai->irq < 0) {
380 + dev_err(&pdev->dev, "no irq for node %s\n", pdev->name);
385 rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
386 --- a/sound/soc/stm/stm32_spdifrx.c
387 +++ b/sound/soc/stm/stm32_spdifrx.c
388 @@ -920,8 +920,10 @@ static int stm32_spdifrx_parse_of(struct
391 spdifrx->irq = platform_get_irq(pdev, 0);
392 - if (spdifrx->irq < 0)
393 + if (spdifrx->irq < 0) {
394 + dev_err(&pdev->dev, "No irq for node %s\n", pdev->name);
400 --- a/sound/soc/sunxi/sun4i-i2s.c
401 +++ b/sound/soc/sunxi/sun4i-i2s.c
402 @@ -1198,8 +1198,10 @@ static int sun4i_i2s_probe(struct platfo
403 return PTR_ERR(regs);
405 irq = platform_get_irq(pdev, 0);
408 + dev_err(&pdev->dev, "Can't retrieve our interrupt\n");
412 i2s->variant = of_device_get_match_data(&pdev->dev);
414 --- a/sound/soc/uniphier/aio-dma.c
415 +++ b/sound/soc/uniphier/aio-dma.c
416 @@ -289,8 +289,10 @@ int uniphier_aiodma_soc_register_platfor
417 return PTR_ERR(chip->regmap);
419 irq = platform_get_irq(pdev, 0);
422 + dev_err(dev, "Could not get irq.\n");
426 ret = devm_request_irq(dev, irq, aiodma_irq,
427 IRQF_SHARED, dev_name(dev), pdev);
428 --- a/sound/soc/xilinx/xlnx_formatter_pcm.c
429 +++ b/sound/soc/xilinx/xlnx_formatter_pcm.c
430 @@ -634,6 +634,7 @@ static int xlnx_formatter_pcm_probe(stru
431 aud_drv_data->mm2s_irq = platform_get_irq_byname(pdev,
433 if (aud_drv_data->mm2s_irq < 0) {
434 + dev_err(dev, "xlnx audio mm2s irq resource failed\n");
435 ret = aud_drv_data->mm2s_irq;
438 @@ -660,6 +661,7 @@ static int xlnx_formatter_pcm_probe(stru
439 aud_drv_data->s2mm_irq = platform_get_irq_byname(pdev,
441 if (aud_drv_data->s2mm_irq < 0) {
442 + dev_err(dev, "xlnx audio s2mm irq resource failed\n");
443 ret = aud_drv_data->s2mm_irq;
446 --- a/sound/soc/xtensa/xtfpga-i2s.c
447 +++ b/sound/soc/xtensa/xtfpga-i2s.c
448 @@ -570,6 +570,7 @@ static int xtfpga_i2s_probe(struct platf
450 irq = platform_get_irq(pdev, 0);
452 + dev_err(&pdev->dev, "No IRQ resource\n");