[ALSA] Add snd_pcm_group_for_each_entry() for code cleanup
Added a new macro snd_pcm_group_for_each_entry() just for code cleanup. Old macros, snd_pcm_group_for_each() and snd_pcm_group_substream_entry(), are removed. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:

committed by
Jaroslav Kysela

szülő
5e24c1c1c4
commit
ef991b95aa
@@ -798,10 +798,8 @@ static int snd_ensoniq_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
{
|
||||
unsigned int what = 0;
|
||||
struct list_head *pos;
|
||||
struct snd_pcm_substream *s;
|
||||
snd_pcm_group_for_each(pos, substream) {
|
||||
s = snd_pcm_group_substream_entry(pos);
|
||||
snd_pcm_group_for_each_entry(s, substream) {
|
||||
if (s == ensoniq->playback1_substream) {
|
||||
what |= ES_P1_PAUSE;
|
||||
snd_pcm_trigger_done(s, substream);
|
||||
@@ -824,10 +822,8 @@ static int snd_ensoniq_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
{
|
||||
unsigned int what = 0;
|
||||
struct list_head *pos;
|
||||
struct snd_pcm_substream *s;
|
||||
snd_pcm_group_for_each(pos, substream) {
|
||||
s = snd_pcm_group_substream_entry(pos);
|
||||
snd_pcm_group_for_each_entry(s, substream) {
|
||||
if (s == ensoniq->playback1_substream) {
|
||||
what |= ES_DAC1_EN;
|
||||
snd_pcm_trigger_done(s, substream);
|
||||
|
Reference in New Issue
Block a user