aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>2007-09-17 08:41:16 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 10:50:44 -0400
commitc2d7051ed1727e6a7b0debe448b5f6ba915e246b (patch)
treecbc71756776d32bfc704486ba96e232233be037d /sound/pci
parent33206e862edb930615a586f5156c2760ddb4bac0 (diff)
[ALSA] Routines for effect processor FX8010: Use list_for_each_entry
Routines for effect processor FX8010: Use list_for_each_entry instead of list_for_each Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> 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/emu10k1/emufx.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 5967e60119fb..3c503bb92d2f 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -642,10 +642,8 @@ snd_emu10k1_look_for_ctl(struct snd_emu10k1 *emu, struct snd_ctl_elem_id *id)
642{ 642{
643 struct snd_emu10k1_fx8010_ctl *ctl; 643 struct snd_emu10k1_fx8010_ctl *ctl;
644 struct snd_kcontrol *kcontrol; 644 struct snd_kcontrol *kcontrol;
645 struct list_head *list; 645
646 646 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
647 list_for_each(list, &emu->fx8010.gpr_ctl) {
648 ctl = emu10k1_gpr_ctl(list);
649 kcontrol = ctl->kcontrol; 647 kcontrol = ctl->kcontrol;
650 if (kcontrol->id.iface == id->iface && 648 if (kcontrol->id.iface == id->iface &&
651 !strcmp(kcontrol->id.name, id->name) && 649 !strcmp(kcontrol->id.name, id->name) &&
@@ -895,14 +893,12 @@ static int snd_emu10k1_list_controls(struct snd_emu10k1 *emu,
895 struct snd_emu10k1_fx8010_control_gpr *gctl; 893 struct snd_emu10k1_fx8010_control_gpr *gctl;
896 struct snd_emu10k1_fx8010_ctl *ctl; 894 struct snd_emu10k1_fx8010_ctl *ctl;
897 struct snd_ctl_elem_id *id; 895 struct snd_ctl_elem_id *id;
898 struct list_head *list;
899 896
900 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL); 897 gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
901 if (! gctl) 898 if (! gctl)
902 return -ENOMEM; 899 return -ENOMEM;
903 900
904 list_for_each(list, &emu->fx8010.gpr_ctl) { 901 list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
905 ctl = emu10k1_gpr_ctl(list);
906 total++; 902 total++;
907 if (icode->gpr_list_controls && 903 if (icode->gpr_list_controls &&
908 i < icode->gpr_list_control_count) { 904 i < icode->gpr_list_control_count) {