File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,14 @@ static int soc_rtd_startup(struct snd_soc_pcm_runtime *rtd,
37
37
return 0 ;
38
38
}
39
39
40
+ static void soc_rtd_shutdown (struct snd_soc_pcm_runtime * rtd ,
41
+ struct snd_pcm_substream * substream )
42
+ {
43
+ if (rtd -> dai_link -> ops &&
44
+ rtd -> dai_link -> ops -> shutdown )
45
+ rtd -> dai_link -> ops -> shutdown (substream );
46
+ }
47
+
40
48
/**
41
49
* snd_soc_runtime_activate() - Increment active count for PCM runtime components
42
50
* @rtd: ASoC PCM runtime that is activated
@@ -602,8 +610,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
602
610
return 0 ;
603
611
604
612
config_err :
605
- if (rtd -> dai_link -> ops -> shutdown )
606
- rtd -> dai_link -> ops -> shutdown (substream );
613
+ soc_rtd_shutdown (rtd , substream );
607
614
608
615
machine_err :
609
616
i = rtd -> num_codecs ;
@@ -674,8 +681,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
674
681
for_each_rtd_codec_dai (rtd , i , codec_dai )
675
682
snd_soc_dai_shutdown (codec_dai , substream );
676
683
677
- if (rtd -> dai_link -> ops -> shutdown )
678
- rtd -> dai_link -> ops -> shutdown (substream );
684
+ soc_rtd_shutdown (rtd , substream );
679
685
680
686
soc_pcm_components_close (substream , NULL );
681
687
You can’t perform that action at this time.
0 commit comments