Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2d7051e authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Jaroslav Kysela
Browse files

[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: default avatarMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 33206e86
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;
+3 −7
Original line number Diff line number Diff line
@@ -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) {