aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.9/950-0148-sound-Suppress-error-message-about-deferrals.patch
blob: 52e36b53325461cfc7a20913f0c0afff50d51bff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
From 6ebd83ad7b2bff00ad3e25811c38e73bb4201b07 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.org>
Date: Thu, 9 Feb 2017 14:40:33 +0000
Subject: [PATCH] sound: Suppress error message about deferrals

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 <phil@raspberrypi.org>
---
 sound/soc/bcm/adau1977-adc.c       | 2 +-
 sound/soc/bcm/allo-piano-dac.c     | 2 +-
 sound/soc/bcm/digidac1-soundcard.c | 4 ++--
 sound/soc/bcm/dionaudio_loco.c     | 2 +-
 sound/soc/bcm/hifiberry_amp.c      | 3 +--
 sound/soc/bcm/hifiberry_dac.c      | 2 +-
 sound/soc/bcm/hifiberry_dacplus.c  | 2 +-
 sound/soc/bcm/hifiberry_digi.c     | 2 +-
 sound/soc/bcm/iqaudio-dac.c        | 5 +++--
 sound/soc/bcm/iqaudio_digi.c       | 2 +-
 sound/soc/bcm/justboom-dac.c       | 2 +-
 sound/soc/bcm/justboom-digi.c      | 2 +-
 sound/soc/bcm/pisound.c            | 3 ++-
 sound/soc/bcm/raspidac3.c          | 2 +-
 sound/soc/bcm/rpi-dac.c            | 2 +-
 sound/soc/bcm/rpi-proto.c          | 3 +--
 16 files changed, 20 insertions(+), 20 deletions(-)

--- a/sound/soc/bcm/adau1977-adc.c
+++ b/sound/soc/bcm/adau1977-adc.c
@@ -90,7 +90,7 @@ static int snd_adau1977_adc_probe(struct
 	}
 
 	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;
--- a/sound/soc/bcm/allo-piano-dac.c
+++ b/sound/soc/bcm/allo-piano-dac.c
@@ -109,7 +109,7 @@ static int snd_allo_piano_dac_probe(stru
 	}
 
 	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);
 
--- a/sound/soc/bcm/digidac1-soundcard.c
+++ b/sound/soc/bcm/digidac1-soundcard.c
@@ -387,9 +387,9 @@ static int digidac1_soundcard_probe(stru
 	}
 
 	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;
 }
--- a/sound/soc/bcm/dionaudio_loco.c
+++ b/sound/soc/bcm/dionaudio_loco.c
@@ -86,7 +86,7 @@ static int snd_rpi_dionaudio_loco_probe(
 	}
 
 	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);
 
--- a/sound/soc/bcm/hifiberry_amp.c
+++ b/sound/soc/bcm/hifiberry_amp.c
@@ -96,9 +96,8 @@ static int snd_rpi_hifiberry_amp_probe(s
 
 	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;
 }
--- a/sound/soc/bcm/hifiberry_dac.c
+++ b/sound/soc/bcm/hifiberry_dac.c
@@ -90,7 +90,7 @@ static int snd_rpi_hifiberry_dac_probe(s
 	}
 
 	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;
--- a/sound/soc/bcm/hifiberry_dacplus.c
+++ b/sound/soc/bcm/hifiberry_dacplus.c
@@ -324,7 +324,7 @@ static int snd_rpi_hifiberry_dacplus_pro
 	}
 
 	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);
 
--- a/sound/soc/bcm/hifiberry_digi.c
+++ b/sound/soc/bcm/hifiberry_digi.c
@@ -242,7 +242,7 @@ static int snd_rpi_hifiberry_digi_probe(
 	}
 
 	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;
--- a/sound/soc/bcm/iqaudio-dac.c
+++ b/sound/soc/bcm/iqaudio-dac.c
@@ -197,8 +197,9 @@ static int snd_rpi_iqaudio_dac_probe(str
 
 	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;
 	}
 
--- a/sound/soc/bcm/iqaudio_digi.c
+++ b/sound/soc/bcm/iqaudio_digi.c
@@ -204,7 +204,7 @@ static int snd_rpi_iqaudio_digi_probe(st
 	}
 
 	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);
 
--- a/sound/soc/bcm/justboom-dac.c
+++ b/sound/soc/bcm/justboom-dac.c
@@ -128,7 +128,7 @@ static int snd_rpi_justboom_dac_probe(st
 	}
 
 	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);
 
--- a/sound/soc/bcm/justboom-digi.c
+++ b/sound/soc/bcm/justboom-digi.c
@@ -181,7 +181,7 @@ static int snd_rpi_justboom_digi_probe(s
 	}
 
 	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);
 
--- a/sound/soc/bcm/pisound.c
+++ b/sound/soc/bcm/pisound.c
@@ -1076,7 +1076,8 @@ static int pisnd_probe(struct platform_d
 	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();
--- a/sound/soc/bcm/raspidac3.c
+++ b/sound/soc/bcm/raspidac3.c
@@ -149,7 +149,7 @@ static int snd_rpi_raspidac3_probe(struc
 	}
 
 	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);
 
--- a/sound/soc/bcm/rpi-dac.c
+++ b/sound/soc/bcm/rpi-dac.c
@@ -85,7 +85,7 @@ static int snd_rpi_rpi_dac_probe(struct
 	}
 	
 	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;
--- a/sound/soc/bcm/rpi-proto.c
+++ b/sound/soc/bcm/rpi-proto.c
@@ -117,10 +117,9 @@ static int snd_rpi_proto_probe(struct pl
 	}
 
 	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;
 }