diff options
Diffstat (limited to 'sound/core/seq/seq_info.c')
| -rw-r--r-- | sound/core/seq/seq_info.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c index b50b695c41c..acf7769419f 100644 --- a/sound/core/seq/seq_info.c +++ b/sound/core/seq/seq_info.c @@ -19,30 +19,30 @@ * */ -#include <sound/driver.h> #include <linux/init.h> +#include <linux/export.h> #include <sound/core.h> #include "seq_info.h" #include "seq_clientmgr.h" #include "seq_timer.h" +#ifdef CONFIG_PROC_FS +static struct snd_info_entry *queues_entry; +static struct snd_info_entry *clients_entry; +static struct snd_info_entry *timer_entry; -static snd_info_entry_t *queues_entry; -static snd_info_entry_t *clients_entry; -static snd_info_entry_t *timer_entry; - -static snd_info_entry_t * __init -create_info_entry(char *name, int size, void (*read)(snd_info_entry_t *, snd_info_buffer_t *)) +static struct snd_info_entry * __init +create_info_entry(char *name, void (*read)(struct snd_info_entry *, + struct snd_info_buffer *)) { - snd_info_entry_t *entry; + struct snd_info_entry *entry; entry = snd_info_create_module_entry(THIS_MODULE, name, snd_seq_root); if (entry == NULL) return NULL; entry->content = SNDRV_INFO_CONTENT_TEXT; - entry->c.text.read_size = size; entry->c.text.read = read; if (snd_info_register(entry) < 0) { snd_info_free_entry(entry); @@ -51,25 +51,22 @@ create_info_entry(char *name, int size, void (*read)(snd_info_entry_t *, snd_inf return entry; } - /* create all our /proc entries */ int __init snd_seq_info_init(void) { - queues_entry = create_info_entry("queues", 512 + (256 * SNDRV_SEQ_MAX_QUEUES), + queues_entry = create_info_entry("queues", snd_seq_info_queues_read); - clients_entry = create_info_entry("clients", 512 + (256 * SNDRV_SEQ_MAX_CLIENTS), + clients_entry = create_info_entry("clients", snd_seq_info_clients_read); - timer_entry = create_info_entry("timer", 1024, snd_seq_info_timer_read); + timer_entry = create_info_entry("timer", snd_seq_info_timer_read); return 0; } int __exit snd_seq_info_done(void) { - if (queues_entry) - snd_info_unregister(queues_entry); - if (clients_entry) - snd_info_unregister(clients_entry); - if (timer_entry) - snd_info_unregister(timer_entry); + snd_info_free_entry(queues_entry); + snd_info_free_entry(clients_entry); + snd_info_free_entry(timer_entry); return 0; } +#endif |
