6 Mar
2019
6 Mar
'19
9:20 a.m.
Hi
Small comment from me
@@ -3257,9 +3268,12 @@ int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, if (state == SND_SOC_DPCM_STATE_START || state == SND_SOC_DPCM_STATE_PAUSED || state == SND_SOC_DPCM_STATE_SUSPEND ||
state == SND_SOC_DPCM_STATE_PREPARE)
state == SND_SOC_DPCM_STATE_PREPARE) {
spin_unlock(&fe->card->dpcm_lock); return 0;
}}
spin_unlock(&fe->card->dpcm_lock);
1st is you want to alignment last spin_unlock() position. 2ns is you want to have clean code which can avoid multiple unlock
ret = 1; // default
spin_lock() for_each_dpcm_fe(be, stream, dpcm) { ... if (xxx) { ret = 0; break; } } spin_unlock()
return ret;
Best regards --- Kuninori Morimoto