Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2d7051ed1727e6a7b0debe448b5f6ba915e246b
Commit:     c2d7051ed1727e6a7b0debe448b5f6ba915e246b
Parent:     33206e862edb930615a586f5156c2760ddb4bac0
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 17 14:41:16 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 16:50:44 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 include/sound/emu10k1.h   |    2 --
 sound/pci/emu10k1/emufx.c |   10 +++-------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h
index acc4277..1f72319 100644
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1408,8 +1408,6 @@ struct snd_emu10k1_fx8010 {
        struct snd_emu10k1_fx8010_irq *irq_handlers;
 };
 
-#define emu10k1_gpr_ctl(n) list_entry(n, struct snd_emu10k1_fx8010_ctl, list)
-
 struct snd_emu10k1_midi {
        struct snd_emu10k1 *emu;
        struct snd_rawmidi *rmidi;
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index 5967e60..3c503bb 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)
 {
        struct snd_emu10k1_fx8010_ctl *ctl;
        struct snd_kcontrol *kcontrol;
-       struct list_head *list;
-       
-       list_for_each(list, &emu->fx8010.gpr_ctl) {
-               ctl = emu10k1_gpr_ctl(list);
+
+       list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
                kcontrol = ctl->kcontrol;
                if (kcontrol->id.iface == id->iface &&
                    !strcmp(kcontrol->id.name, id->name) &&
@@ -895,14 +893,12 @@ static int snd_emu10k1_list_controls(struct snd_emu10k1 
*emu,
        struct snd_emu10k1_fx8010_control_gpr *gctl;
        struct snd_emu10k1_fx8010_ctl *ctl;
        struct snd_ctl_elem_id *id;
-       struct list_head *list;
 
        gctl = kmalloc(sizeof(*gctl), GFP_KERNEL);
        if (! gctl)
                return -ENOMEM;
 
-       list_for_each(list, &emu->fx8010.gpr_ctl) {
-               ctl = emu10k1_gpr_ctl(list);
+       list_for_each_entry(ctl, &emu->fx8010.gpr_ctl, list) {
                total++;
                if (icode->gpr_list_controls &&
                    i < icode->gpr_list_control_count) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to