Skip to content

Commit

Permalink
sound: Suppress error message about deferrals
Browse files Browse the repository at this point in the history
Since driver load deferrals are expected and will already
have resulted in a kernel message, suppress an essentially
duplicate error message from the RPi audio board drivers.

Signed-off-by: Phil Elwell <[email protected]>
  • Loading branch information
Phil Elwell authored and popcornmix committed Feb 10, 2017
1 parent bac9ec6 commit bc589fd
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion sound/soc/bcm/adau1977-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int snd_adau1977_adc_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_adau1977_adc);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);

return ret;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/allo-piano-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static int snd_allo_piano_dac_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_allo_piano_dac);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);

Expand Down
4 changes: 2 additions & 2 deletions sound/soc/bcm/digidac1-soundcard.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,9 @@ static int digidac1_soundcard_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&digidac1_soundcard);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
ret);
ret);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/dionaudio_loco.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static int snd_rpi_dionaudio_loco_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_dionaudio_loco);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
ret);

Expand Down
3 changes: 1 addition & 2 deletions sound/soc/bcm/hifiberry_amp.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ static int snd_rpi_hifiberry_amp_probe(struct platform_device *pdev)

ret = snd_soc_register_card(&snd_rpi_hifiberry_amp);

if (ret != 0) {
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);
}

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/hifiberry_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static int snd_rpi_hifiberry_dac_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_hifiberry_dac);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);

return ret;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/hifiberry_dacplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static int snd_rpi_hifiberry_dacplus_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_hifiberry_dacplus);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/hifiberry_digi.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static int snd_rpi_hifiberry_digi_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_hifiberry_digi);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);

return ret;
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/bcm/iqaudio-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ static int snd_rpi_iqaudio_dac_probe(struct platform_device *pdev)

ret = snd_soc_register_card(&snd_rpi_iqaudio_dac);
if (ret) {
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);
if (ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/iqaudio_digi.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static int snd_rpi_iqaudio_digi_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(card);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
ret);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/justboom-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static int snd_rpi_justboom_dac_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_justboom_dac);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/justboom-digi.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ static int snd_rpi_justboom_digi_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_justboom_digi);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);

Expand Down
3 changes: 2 additions & 1 deletion sound/soc/bcm/pisound.c
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,8 @@ static int pisnd_probe(struct platform_device *pdev)
ret = snd_soc_register_card(&pisnd_card);

if (ret < 0) {
printe("snd_soc_register_card() failed: %d\n", ret);
if (ret != -EPROBE_DEFER)
printe("snd_soc_register_card() failed: %d\n", ret);
pisnd_uninit_gpio();
kobject_put(pisnd_kobj);
pisnd_spi_uninit();
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/raspidac3.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int snd_rpi_raspidac3_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_raspidac3);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/bcm/rpi-dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int snd_rpi_rpi_dac_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_rpi_dac);
if (ret)
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", ret);

return ret;
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/bcm/rpi-proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ static int snd_rpi_proto_probe(struct platform_device *pdev)
}

ret = snd_soc_register_card(&snd_rpi_proto);
if (ret) {
if (ret && ret != -EPROBE_DEFER)
dev_err(&pdev->dev,
"snd_soc_register_card() failed: %d\n", ret);
}

return ret;
}
Expand Down

0 comments on commit bc589fd

Please sign in to comment.