aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/hwdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/hwdep.c')
-rw-r--r--sound/core/hwdep.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index 46b47689362c..a6a6ad0ad3c8 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -47,14 +47,11 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device);
47 47
48static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device) 48static struct snd_hwdep *snd_hwdep_search(struct snd_card *card, int device)
49{ 49{
50 struct list_head *p;
51 struct snd_hwdep *hwdep; 50 struct snd_hwdep *hwdep;
52 51
53 list_for_each(p, &snd_hwdep_devices) { 52 list_for_each_entry(hwdep, &snd_hwdep_devices, list)
54 hwdep = list_entry(p, struct snd_hwdep, list);
55 if (hwdep->card == card && hwdep->device == device) 53 if (hwdep->card == card && hwdep->device == device)
56 return hwdep; 54 return hwdep;
57 }
58 return NULL; 55 return NULL;
59} 56}
60 57
@@ -468,15 +465,12 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device)
468static void snd_hwdep_proc_read(struct snd_info_entry *entry, 465static void snd_hwdep_proc_read(struct snd_info_entry *entry,
469 struct snd_info_buffer *buffer) 466 struct snd_info_buffer *buffer)
470{ 467{
471 struct list_head *p;
472 struct snd_hwdep *hwdep; 468 struct snd_hwdep *hwdep;
473 469
474 mutex_lock(&register_mutex); 470 mutex_lock(&register_mutex);
475 list_for_each(p, &snd_hwdep_devices) { 471 list_for_each_entry(hwdep, &snd_hwdep_devices, list)
476 hwdep = list_entry(p, struct snd_hwdep, list);
477 snd_iprintf(buffer, "%02i-%02i: %s\n", 472 snd_iprintf(buffer, "%02i-%02i: %s\n",
478 hwdep->card->number, hwdep->device, hwdep->name); 473 hwdep->card->number, hwdep->device, hwdep->name);
479 }
480 mutex_unlock(&register_mutex); 474 mutex_unlock(&register_mutex);
481} 475}
482 476