File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ int snd_soc_card_resume_post(struct snd_soc_card *card);
26
26
27
27
int snd_soc_card_probe (struct snd_soc_card * card );
28
28
int snd_soc_card_late_probe (struct snd_soc_card * card );
29
+ int snd_soc_card_remove (struct snd_soc_card * card );
29
30
30
31
/* device driver data */
31
32
static inline void snd_soc_card_set_drvdata (struct snd_soc_card * card ,
Original file line number Diff line number Diff line change @@ -166,3 +166,16 @@ int snd_soc_card_late_probe(struct snd_soc_card *card)
166
166
167
167
return 0 ;
168
168
}
169
+
170
+ int snd_soc_card_remove (struct snd_soc_card * card )
171
+ {
172
+ int ret = 0 ;
173
+
174
+ if (card -> probed &&
175
+ card -> remove )
176
+ ret = card -> remove (card );
177
+
178
+ card -> probed = 0 ;
179
+
180
+ return soc_card_ret (card , ret );
181
+ }
Original file line number Diff line number Diff line change @@ -1747,9 +1747,7 @@ static void soc_cleanup_card_resources(struct snd_soc_card *card)
1747
1747
soc_cleanup_card_debugfs (card );
1748
1748
1749
1749
/* remove the card */
1750
- if (card -> probed && card -> remove )
1751
- card -> remove (card );
1752
- card -> probed = 0 ;
1750
+ snd_soc_card_remove (card );
1753
1751
1754
1752
if (card -> snd_card ) {
1755
1753
snd_card_free (card -> snd_card );
You can’t perform that action at this time.
0 commit comments