diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-02-22 06:52:53 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-05-11 10:55:42 -0400 |
commit | ef991b95aa1351a5782cfaccb9aefba76ca8b990 (patch) | |
tree | 129762745099142652615dbe1c4c29725cca51c8 /sound/pci | |
parent | 5e24c1c1c496c4603395d6e9cc320f85008fc891 (diff) |
[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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 4 | ||||
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 4 | ||||
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 4 | ||||
-rw-r--r-- | sound/pci/emu10k1/p16v.c | 4 | ||||
-rw-r--r-- | sound/pci/ens1370.c | 8 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1712.c | 4 | ||||
-rw-r--r-- | sound/pci/ice1712/ice1724.c | 4 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 7 | ||||
-rw-r--r-- | sound/pci/rme32.c | 7 | ||||
-rw-r--r-- | sound/pci/rme9652/hdsp.c | 8 | ||||
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 8 | ||||
-rw-r--r-- | sound/pci/rme9652/rme9652.c | 8 | ||||
-rw-r--r-- | sound/pci/trident/trident_main.c | 4 |
13 files changed, 19 insertions, 55 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index ba7fa22b285d..cd2fe374744c 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -1224,7 +1224,6 @@ static int snd_ali_trigger(struct snd_pcm_substream *substream, | |||
1224 | 1224 | ||
1225 | { | 1225 | { |
1226 | struct snd_ali *codec = snd_pcm_substream_chip(substream); | 1226 | struct snd_ali *codec = snd_pcm_substream_chip(substream); |
1227 | struct list_head *pos; | ||
1228 | struct snd_pcm_substream *s; | 1227 | struct snd_pcm_substream *s; |
1229 | unsigned int what, whati, capture_flag; | 1228 | unsigned int what, whati, capture_flag; |
1230 | struct snd_ali_voice *pvoice = NULL, *evoice = NULL; | 1229 | struct snd_ali_voice *pvoice = NULL, *evoice = NULL; |
@@ -1243,8 +1242,7 @@ static int snd_ali_trigger(struct snd_pcm_substream *substream, | |||
1243 | } | 1242 | } |
1244 | 1243 | ||
1245 | what = whati = capture_flag = 0; | 1244 | what = whati = capture_flag = 0; |
1246 | snd_pcm_group_for_each(pos, substream) { | 1245 | snd_pcm_group_for_each_entry(s, substream) { |
1247 | s = snd_pcm_group_substream_entry(pos); | ||
1248 | if ((struct snd_ali *) snd_pcm_substream_chip(s) == codec) { | 1246 | if ((struct snd_ali *) snd_pcm_substream_chip(s) == codec) { |
1249 | pvoice = s->runtime->private_data; | 1247 | pvoice = s->runtime->private_data; |
1250 | evoice = pvoice->extra; | 1248 | evoice = pvoice->extra; |
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index ea6712b63c9f..48f3f17c5170 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -775,7 +775,6 @@ static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream, | |||
775 | struct snd_ca0106_pcm *epcm; | 775 | struct snd_ca0106_pcm *epcm; |
776 | int channel; | 776 | int channel; |
777 | int result = 0; | 777 | int result = 0; |
778 | struct list_head *pos; | ||
779 | struct snd_pcm_substream *s; | 778 | struct snd_pcm_substream *s; |
780 | u32 basic = 0; | 779 | u32 basic = 0; |
781 | u32 extended = 0; | 780 | u32 extended = 0; |
@@ -790,8 +789,7 @@ static int snd_ca0106_pcm_trigger_playback(struct snd_pcm_substream *substream, | |||
790 | running=0; | 789 | running=0; |
791 | break; | 790 | break; |
792 | } | 791 | } |
793 | snd_pcm_group_for_each(pos, substream) { | 792 | snd_pcm_group_for_each_entry(s, substream) { |
794 | s = snd_pcm_group_substream_entry(pos); | ||
795 | runtime = s->runtime; | 793 | runtime = s->runtime; |
796 | epcm = runtime->private_data; | 794 | epcm = runtime->private_data; |
797 | channel = epcm->channel_id; | 795 | channel = epcm->channel_id; |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index e413da00759b..f27b6a733b96 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -705,11 +705,9 @@ static int pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
705 | struct audiopipe *pipe = runtime->private_data; | 705 | struct audiopipe *pipe = runtime->private_data; |
706 | int i, err; | 706 | int i, err; |
707 | u32 channelmask = 0; | 707 | u32 channelmask = 0; |
708 | struct list_head *pos; | ||
709 | struct snd_pcm_substream *s; | 708 | struct snd_pcm_substream *s; |
710 | 709 | ||
711 | snd_pcm_group_for_each(pos, substream) { | 710 | snd_pcm_group_for_each_entry(s, substream) { |
712 | s = snd_pcm_group_substream_entry(pos); | ||
713 | for (i = 0; i < DSP_MAXPIPES; i++) { | 711 | for (i = 0; i < DSP_MAXPIPES; i++) { |
714 | if (s == chip->substream[i]) { | 712 | if (s == chip->substream[i]) { |
715 | channelmask |= 1 << i; | 713 | channelmask |= 1 << i; |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index 465f8d505329..7ee19c63c2c8 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
@@ -433,7 +433,6 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream, | |||
433 | struct snd_emu10k1_pcm *epcm; | 433 | struct snd_emu10k1_pcm *epcm; |
434 | int channel; | 434 | int channel; |
435 | int result = 0; | 435 | int result = 0; |
436 | struct list_head *pos; | ||
437 | struct snd_pcm_substream *s; | 436 | struct snd_pcm_substream *s; |
438 | u32 basic = 0; | 437 | u32 basic = 0; |
439 | u32 inte = 0; | 438 | u32 inte = 0; |
@@ -448,8 +447,7 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream, | |||
448 | running = 0; | 447 | running = 0; |
449 | break; | 448 | break; |
450 | } | 449 | } |
451 | snd_pcm_group_for_each(pos, substream) { | 450 | snd_pcm_group_for_each_entry(s, substream) { |
452 | s = snd_pcm_group_substream_entry(pos); | ||
453 | runtime = s->runtime; | 451 | runtime = s->runtime; |
454 | epcm = runtime->private_data; | 452 | epcm = runtime->private_data; |
455 | channel = substream->pcm->device-emu->p16v_device_offset; | 453 | channel = substream->pcm->device-emu->p16v_device_offset; |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 425b167522d5..6a0ddcf00884 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -798,10 +798,8 @@ static int snd_ensoniq_trigger(struct snd_pcm_substream *substream, int cmd) | |||
798 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: | 798 | case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: |
799 | { | 799 | { |
800 | unsigned int what = 0; | 800 | unsigned int what = 0; |
801 | struct list_head *pos; | ||
802 | struct snd_pcm_substream *s; | 801 | struct snd_pcm_substream *s; |
803 | snd_pcm_group_for_each(pos, substream) { | 802 | snd_pcm_group_for_each_entry(s, substream) { |
804 | s = snd_pcm_group_substream_entry(pos); | ||
805 | if (s == ensoniq->playback1_substream) { | 803 | if (s == ensoniq->playback1_substream) { |
806 | what |= ES_P1_PAUSE; | 804 | what |= ES_P1_PAUSE; |
807 | snd_pcm_trigger_done(s, substream); | 805 | snd_pcm_trigger_done(s, substream); |
@@ -824,10 +822,8 @@ static int snd_ensoniq_trigger(struct snd_pcm_substream *substream, int cmd) | |||
824 | case SNDRV_PCM_TRIGGER_STOP: | 822 | case SNDRV_PCM_TRIGGER_STOP: |
825 | { | 823 | { |
826 | unsigned int what = 0; | 824 | unsigned int what = 0; |
827 | struct list_head *pos; | ||
828 | struct snd_pcm_substream *s; | 825 | struct snd_pcm_substream *s; |
829 | snd_pcm_group_for_each(pos, substream) { | 826 | snd_pcm_group_for_each_entry(s, substream) { |
830 | s = snd_pcm_group_substream_entry(pos); | ||
831 | if (s == ensoniq->playback1_substream) { | 827 | if (s == ensoniq->playback1_substream) { |
832 | what |= ES_DAC1_EN; | 828 | what |= ES_DAC1_EN; |
833 | snd_pcm_trigger_done(s, substream); | 829 | snd_pcm_trigger_done(s, substream); |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 830a1bbd7110..e880469beb4f 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -977,11 +977,9 @@ static int snd_ice1712_pro_trigger(struct snd_pcm_substream *substream, | |||
977 | { | 977 | { |
978 | unsigned int what = 0; | 978 | unsigned int what = 0; |
979 | unsigned int old; | 979 | unsigned int old; |
980 | struct list_head *pos; | ||
981 | struct snd_pcm_substream *s; | 980 | struct snd_pcm_substream *s; |
982 | 981 | ||
983 | snd_pcm_group_for_each(pos, substream) { | 982 | snd_pcm_group_for_each_entry(s, substream) { |
984 | s = snd_pcm_group_substream_entry(pos); | ||
985 | if (s == ice->playback_pro_substream) { | 983 | if (s == ice->playback_pro_substream) { |
986 | what |= ICE1712_PLAYBACK_START; | 984 | what |= ICE1712_PLAYBACK_START; |
987 | snd_pcm_trigger_done(s, substream); | 985 | snd_pcm_trigger_done(s, substream); |
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 1127ebdf5fec..3f2aca20a625 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -337,13 +337,11 @@ static int snd_vt1724_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
337 | struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); | 337 | struct snd_ice1712 *ice = snd_pcm_substream_chip(substream); |
338 | unsigned char what; | 338 | unsigned char what; |
339 | unsigned char old; | 339 | unsigned char old; |
340 | struct list_head *pos; | ||
341 | struct snd_pcm_substream *s; | 340 | struct snd_pcm_substream *s; |
342 | 341 | ||
343 | what = 0; | 342 | what = 0; |
344 | snd_pcm_group_for_each(pos, substream) { | 343 | snd_pcm_group_for_each_entry(s, substream) { |
345 | const struct vt1724_pcm_reg *reg; | 344 | const struct vt1724_pcm_reg *reg; |
346 | s = snd_pcm_group_substream_entry(pos); | ||
347 | reg = s->runtime->private_data; | 345 | reg = s->runtime->private_data; |
348 | what |= reg->start; | 346 | what |= reg->start; |
349 | snd_pcm_trigger_done(s, substream); | 347 | snd_pcm_trigger_done(s, substream); |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index d97413484ae9..e1bdeed3a465 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -638,7 +638,6 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
638 | static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) | 638 | static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) |
639 | { | 639 | { |
640 | struct pcxhr_stream *stream; | 640 | struct pcxhr_stream *stream; |
641 | struct list_head *pos; | ||
642 | struct snd_pcm_substream *s; | 641 | struct snd_pcm_substream *s; |
643 | int i; | 642 | int i; |
644 | 643 | ||
@@ -646,8 +645,7 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) | |||
646 | case SNDRV_PCM_TRIGGER_START: | 645 | case SNDRV_PCM_TRIGGER_START: |
647 | snd_printdd("SNDRV_PCM_TRIGGER_START\n"); | 646 | snd_printdd("SNDRV_PCM_TRIGGER_START\n"); |
648 | i = 0; | 647 | i = 0; |
649 | snd_pcm_group_for_each(pos, subs) { | 648 | snd_pcm_group_for_each_entry(s, subs) { |
650 | s = snd_pcm_group_substream_entry(pos); | ||
651 | stream = s->runtime->private_data; | 649 | stream = s->runtime->private_data; |
652 | stream->status = PCXHR_STREAM_STATUS_SCHEDULE_RUN; | 650 | stream->status = PCXHR_STREAM_STATUS_SCHEDULE_RUN; |
653 | snd_pcm_trigger_done(s, subs); | 651 | snd_pcm_trigger_done(s, subs); |
@@ -672,8 +670,7 @@ static int pcxhr_trigger(struct snd_pcm_substream *subs, int cmd) | |||
672 | break; | 670 | break; |
673 | case SNDRV_PCM_TRIGGER_STOP: | 671 | case SNDRV_PCM_TRIGGER_STOP: |
674 | snd_printdd("SNDRV_PCM_TRIGGER_STOP\n"); | 672 | snd_printdd("SNDRV_PCM_TRIGGER_STOP\n"); |
675 | snd_pcm_group_for_each(pos, subs) { | 673 | snd_pcm_group_for_each_entry(s, subs) { |
676 | s = snd_pcm_group_substream_entry(pos); | ||
677 | stream = s->runtime->private_data; | 674 | stream = s->runtime->private_data; |
678 | stream->status = PCXHR_STREAM_STATUS_SCHEDULE_STOP; | 675 | stream->status = PCXHR_STREAM_STATUS_SCHEDULE_STOP; |
679 | if (pcxhr_set_stream_state(stream)) | 676 | if (pcxhr_set_stream_state(stream)) |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index 6bb7ac650ec4..618653e22561 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -1078,12 +1078,10 @@ static int | |||
1078 | snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | 1078 | snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd) |
1079 | { | 1079 | { |
1080 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); | 1080 | struct rme32 *rme32 = snd_pcm_substream_chip(substream); |
1081 | struct list_head *pos; | ||
1082 | struct snd_pcm_substream *s; | 1081 | struct snd_pcm_substream *s; |
1083 | 1082 | ||
1084 | spin_lock(&rme32->lock); | 1083 | spin_lock(&rme32->lock); |
1085 | snd_pcm_group_for_each(pos, substream) { | 1084 | snd_pcm_group_for_each_entry(s, substream) { |
1086 | s = snd_pcm_group_substream_entry(pos); | ||
1087 | if (s != rme32->playback_substream && | 1085 | if (s != rme32->playback_substream && |
1088 | s != rme32->capture_substream) | 1086 | s != rme32->capture_substream) |
1089 | continue; | 1087 | continue; |
@@ -1110,8 +1108,7 @@ snd_rme32_pcm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
1110 | 1108 | ||
1111 | /* prefill playback buffer */ | 1109 | /* prefill playback buffer */ |
1112 | if (cmd == SNDRV_PCM_TRIGGER_START && rme32->fullduplex_mode) { | 1110 | if (cmd == SNDRV_PCM_TRIGGER_START && rme32->fullduplex_mode) { |
1113 | snd_pcm_group_for_each(pos, substream) { | 1111 | snd_pcm_group_for_each_entry(s, substream) { |
1114 | s = snd_pcm_group_substream_entry(pos); | ||
1115 | if (s == rme32->playback_substream) { | 1112 | if (s == rme32->playback_substream) { |
1116 | s->ops->ack(s); | 1113 | s->ops->ack(s); |
1117 | break; | 1114 | break; |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index 89b3c7ff5037..6540037a11e4 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -3780,11 +3780,9 @@ static int snd_hdsp_reset(struct snd_pcm_substream *substream) | |||
3780 | else | 3780 | else |
3781 | runtime->status->hw_ptr = 0; | 3781 | runtime->status->hw_ptr = 0; |
3782 | if (other) { | 3782 | if (other) { |
3783 | struct list_head *pos; | ||
3784 | struct snd_pcm_substream *s; | 3783 | struct snd_pcm_substream *s; |
3785 | struct snd_pcm_runtime *oruntime = other->runtime; | 3784 | struct snd_pcm_runtime *oruntime = other->runtime; |
3786 | snd_pcm_group_for_each(pos, substream) { | 3785 | snd_pcm_group_for_each_entry(s, substream) { |
3787 | s = snd_pcm_group_substream_entry(pos); | ||
3788 | if (s == other) { | 3786 | if (s == other) { |
3789 | oruntime->status->hw_ptr = runtime->status->hw_ptr; | 3787 | oruntime->status->hw_ptr = runtime->status->hw_ptr; |
3790 | break; | 3788 | break; |
@@ -3933,10 +3931,8 @@ static int snd_hdsp_trigger(struct snd_pcm_substream *substream, int cmd) | |||
3933 | other = hdsp->playback_substream; | 3931 | other = hdsp->playback_substream; |
3934 | 3932 | ||
3935 | if (other) { | 3933 | if (other) { |
3936 | struct list_head *pos; | ||
3937 | struct snd_pcm_substream *s; | 3934 | struct snd_pcm_substream *s; |
3938 | snd_pcm_group_for_each(pos, substream) { | 3935 | snd_pcm_group_for_each_entry(s, substream) { |
3939 | s = snd_pcm_group_substream_entry(pos); | ||
3940 | if (s == other) { | 3936 | if (s == other) { |
3941 | snd_pcm_trigger_done(s, substream); | 3937 | snd_pcm_trigger_done(s, substream); |
3942 | if (cmd == SNDRV_PCM_TRIGGER_START) | 3938 | if (cmd == SNDRV_PCM_TRIGGER_START) |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 6e95857e4e67..d2ae6380943e 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -3575,11 +3575,9 @@ static int snd_hdspm_reset(struct snd_pcm_substream *substream) | |||
3575 | else | 3575 | else |
3576 | runtime->status->hw_ptr = 0; | 3576 | runtime->status->hw_ptr = 0; |
3577 | if (other) { | 3577 | if (other) { |
3578 | struct list_head *pos; | ||
3579 | struct snd_pcm_substream *s; | 3578 | struct snd_pcm_substream *s; |
3580 | struct snd_pcm_runtime *oruntime = other->runtime; | 3579 | struct snd_pcm_runtime *oruntime = other->runtime; |
3581 | snd_pcm_group_for_each(pos, substream) { | 3580 | snd_pcm_group_for_each_entry(s, substream) { |
3582 | s = snd_pcm_group_substream_entry(pos); | ||
3583 | if (s == other) { | 3581 | if (s == other) { |
3584 | oruntime->status->hw_ptr = | 3582 | oruntime->status->hw_ptr = |
3585 | runtime->status->hw_ptr; | 3583 | runtime->status->hw_ptr; |
@@ -3791,10 +3789,8 @@ static int snd_hdspm_trigger(struct snd_pcm_substream *substream, int cmd) | |||
3791 | other = hdspm->playback_substream; | 3789 | other = hdspm->playback_substream; |
3792 | 3790 | ||
3793 | if (other) { | 3791 | if (other) { |
3794 | struct list_head *pos; | ||
3795 | struct snd_pcm_substream *s; | 3792 | struct snd_pcm_substream *s; |
3796 | snd_pcm_group_for_each(pos, substream) { | 3793 | snd_pcm_group_for_each_entry(s, substream) { |
3797 | s = snd_pcm_group_substream_entry(pos); | ||
3798 | if (s == other) { | 3794 | if (s == other) { |
3799 | snd_pcm_trigger_done(s, substream); | 3795 | snd_pcm_trigger_done(s, substream); |
3800 | if (cmd == SNDRV_PCM_TRIGGER_START) | 3796 | if (cmd == SNDRV_PCM_TRIGGER_START) |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index cc3bdececce7..bd7dbd267ed1 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -1992,11 +1992,9 @@ static int snd_rme9652_reset(struct snd_pcm_substream *substream) | |||
1992 | else | 1992 | else |
1993 | runtime->status->hw_ptr = 0; | 1993 | runtime->status->hw_ptr = 0; |
1994 | if (other) { | 1994 | if (other) { |
1995 | struct list_head *pos; | ||
1996 | struct snd_pcm_substream *s; | 1995 | struct snd_pcm_substream *s; |
1997 | struct snd_pcm_runtime *oruntime = other->runtime; | 1996 | struct snd_pcm_runtime *oruntime = other->runtime; |
1998 | snd_pcm_group_for_each(pos, substream) { | 1997 | snd_pcm_group_for_each_entry(s, substream) { |
1999 | s = snd_pcm_group_substream_entry(pos); | ||
2000 | if (s == other) { | 1998 | if (s == other) { |
2001 | oruntime->status->hw_ptr = runtime->status->hw_ptr; | 1999 | oruntime->status->hw_ptr = runtime->status->hw_ptr; |
2002 | break; | 2000 | break; |
@@ -2140,10 +2138,8 @@ static int snd_rme9652_trigger(struct snd_pcm_substream *substream, | |||
2140 | other = rme9652->playback_substream; | 2138 | other = rme9652->playback_substream; |
2141 | 2139 | ||
2142 | if (other) { | 2140 | if (other) { |
2143 | struct list_head *pos; | ||
2144 | struct snd_pcm_substream *s; | 2141 | struct snd_pcm_substream *s; |
2145 | snd_pcm_group_for_each(pos, substream) { | 2142 | snd_pcm_group_for_each_entry(s, substream) { |
2146 | s = snd_pcm_group_substream_entry(pos); | ||
2147 | if (s == other) { | 2143 | if (s == other) { |
2148 | snd_pcm_trigger_done(s, substream); | 2144 | snd_pcm_trigger_done(s, substream); |
2149 | if (cmd == SNDRV_PCM_TRIGGER_START) | 2145 | if (cmd == SNDRV_PCM_TRIGGER_START) |
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index 3bff32167f66..7ca606272460 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -1540,7 +1540,6 @@ static int snd_trident_trigger(struct snd_pcm_substream *substream, | |||
1540 | 1540 | ||
1541 | { | 1541 | { |
1542 | struct snd_trident *trident = snd_pcm_substream_chip(substream); | 1542 | struct snd_trident *trident = snd_pcm_substream_chip(substream); |
1543 | struct list_head *pos; | ||
1544 | struct snd_pcm_substream *s; | 1543 | struct snd_pcm_substream *s; |
1545 | unsigned int what, whati, capture_flag, spdif_flag; | 1544 | unsigned int what, whati, capture_flag, spdif_flag; |
1546 | struct snd_trident_voice *voice, *evoice; | 1545 | struct snd_trident_voice *voice, *evoice; |
@@ -1563,8 +1562,7 @@ static int snd_trident_trigger(struct snd_pcm_substream *substream, | |||
1563 | what = whati = capture_flag = spdif_flag = 0; | 1562 | what = whati = capture_flag = spdif_flag = 0; |
1564 | spin_lock(&trident->reg_lock); | 1563 | spin_lock(&trident->reg_lock); |
1565 | val = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff; | 1564 | val = inl(TRID_REG(trident, T4D_STIMER)) & 0x00ffffff; |
1566 | snd_pcm_group_for_each(pos, substream) { | 1565 | snd_pcm_group_for_each_entry(s, substream) { |
1567 | s = snd_pcm_group_substream_entry(pos); | ||
1568 | if ((struct snd_trident *) snd_pcm_substream_chip(s) == trident) { | 1566 | if ((struct snd_trident *) snd_pcm_substream_chip(s) == trident) { |
1569 | voice = s->runtime->private_data; | 1567 | voice = s->runtime->private_data; |
1570 | evoice = voice->extra; | 1568 | evoice = voice->extra; |