aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/control_compat.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2006-10-05 10:02:22 -0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:00:10 -0500
commit9244b2c3079faac79b3b961116bd548c45087e2c (patch)
tree1a9e2ead054ed58efcad3fd43fb2aedeb6731baa /sound/core/control_compat.c
parentd595ee7e0162ae66faa8c4c7d8c2069b40d64fed (diff)
[ALSA] alsa core: convert to list_for_each_entry*
This patch converts most uses of list_for_each to list_for_each_entry all across alsa. In some place apparently an item can be on a list with different pointers so of course that isn't compatible with list_for_each, I therefore didn't touch those places. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core/control_compat.c')
-rw-r--r--sound/core/control_compat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/core/control_compat.c b/sound/core/control_compat.c
index ab48962c48c..9311ca397bb 100644
--- a/sound/core/control_compat.c
+++ b/sound/core/control_compat.c
@@ -392,7 +392,7 @@ enum {
392static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg) 392static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
393{ 393{
394 struct snd_ctl_file *ctl; 394 struct snd_ctl_file *ctl;
395 struct list_head *list; 395 struct snd_kctl_ioctl *p;
396 void __user *argp = compat_ptr(arg); 396 void __user *argp = compat_ptr(arg);
397 int err; 397 int err;
398 398
@@ -427,8 +427,7 @@ static inline long snd_ctl_ioctl_compat(struct file *file, unsigned int cmd, uns
427 } 427 }
428 428
429 down_read(&snd_ioctl_rwsem); 429 down_read(&snd_ioctl_rwsem);
430 list_for_each(list, &snd_control_compat_ioctls) { 430 list_for_each_entry(p, &snd_control_compat_ioctls, list) {
431 struct snd_kctl_ioctl *p = list_entry(list, struct snd_kctl_ioctl, list);
432 if (p->fioctl) { 431 if (p->fioctl) {
433 err = p->fioctl(ctl->card, ctl, cmd, arg); 432 err = p->fioctl(ctl->card, ctl, cmd, arg);
434 if (err != -ENOIOCTLCMD) { 433 if (err != -ENOIOCTLCMD) {