From e5fd91f1ef340da553f7a79da9540c3db711c937 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Tue, 8 Sep 2015 01:01:14 -0300 Subject: Linux-libre 4.2-gnu --- sound/core/info_oss.c | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) (limited to 'sound/core/info_oss.c') diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index 83c29dbff..1478c8dfd 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -29,15 +29,12 @@ #include #include -#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) - /* * OSS compatible part */ static DEFINE_MUTEX(strings); static char *snd_sndstat_strings[SNDRV_CARDS][SNDRV_OSS_INFO_DEV_COUNT]; -static struct snd_info_entry *snd_sndstat_proc_entry; int snd_oss_info_register(int dev, int num, char *string) { @@ -112,27 +109,15 @@ static void snd_sndstat_proc_read(struct snd_info_entry *entry, snd_sndstat_show_strings(buffer, "Mixers", SNDRV_OSS_INFO_DEV_MIXERS); } -int snd_info_minor_register(void) +int __init snd_info_minor_register(void) { struct snd_info_entry *entry; memset(snd_sndstat_strings, 0, sizeof(snd_sndstat_strings)); - if ((entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", snd_oss_root)) != NULL) { - entry->c.text.read = snd_sndstat_proc_read; - if (snd_info_register(entry) < 0) { - snd_info_free_entry(entry); - entry = NULL; - } - } - snd_sndstat_proc_entry = entry; - return 0; + entry = snd_info_create_module_entry(THIS_MODULE, "sndstat", + snd_oss_root); + if (!entry) + return -ENOMEM; + entry->c.text.read = snd_sndstat_proc_read; + return snd_info_register(entry); /* freed in error path */ } - -int snd_info_minor_unregister(void) -{ - snd_info_free_entry(snd_sndstat_proc_entry); - snd_sndstat_proc_entry = NULL; - return 0; -} - -#endif /* CONFIG_SND_OSSEMUL */ -- cgit v1.2.3-54-g00ecf