summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-07 02:58:15 +0400
committerAdrian Bunk <bunk@kernel.org>2007-10-07 02:58:15 +0400
commitd98c1fe4557680dd52543db7716d2badd6701cf7 (patch)
tree77fa14fe14d47d1138e9fd8cac29b008893f394e /sound
parenta578b99b87e77138219022179799f62c68018d74 (diff)
downloadlinux-d98c1fe4557680dd52543db7716d2badd6701cf7.tar.xz
snd_mem_proc_read(): convert to list_for_each_entry*
Stolen from a patch by Johannes Berg <johannes@sipsolutions.net>. Signed-off-by: Adrian Bunk <bunk@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/memalloc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 19b3dcbb09c2..abe270aa6f36 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -517,7 +517,6 @@ static int snd_mem_proc_read(char *page, char **start, off_t off,
{
int len = 0;
long pages = snd_allocated_pages >> (PAGE_SHIFT-12);
- struct list_head *p;
struct snd_mem_list *mem;
int devno;
static char *types[] = { "UNKNOWN", "CONT", "DEV", "DEV-SG", "SBUS" };
@@ -527,8 +526,7 @@ static int snd_mem_proc_read(char *page, char **start, off_t off,
"pages : %li bytes (%li pages per %likB)\n",
pages * PAGE_SIZE, pages, PAGE_SIZE / 1024);
devno = 0;
- list_for_each(p, &mem_list_head) {
- mem = list_entry(p, struct snd_mem_list, list);
+ list_for_each_entry(mem, &mem_list_head, list) {
devno++;
len += snprintf(page + len, count - len,
"buffer %d : ID %08x : type %s\n",