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/sound_oss.c | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) (limited to 'sound/core/sound_oss.c') diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 573a65eb2..0ca9d72b2 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -19,12 +19,6 @@ * */ -#ifdef CONFIG_SND_OSSEMUL - -#if !IS_ENABLED(CONFIG_SOUND) -#error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." -#endif - #include #include #include @@ -213,10 +207,7 @@ EXPORT_SYMBOL(snd_unregister_oss_device); * INFO PART */ -#ifdef CONFIG_PROC_FS - -static struct snd_info_entry *snd_minor_info_oss_entry; - +#ifdef CONFIG_SND_PROC_FS static const char *snd_oss_device_type_name(int type) { switch (type) { @@ -263,22 +254,9 @@ int __init snd_minor_info_oss_init(void) struct snd_info_entry *entry; entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root); - if (entry) { - entry->c.text.read = snd_minor_info_oss_read; - if (snd_info_register(entry) < 0) { - snd_info_free_entry(entry); - entry = NULL; - } - } - snd_minor_info_oss_entry = entry; - return 0; -} - -int __exit snd_minor_info_oss_done(void) -{ - snd_info_free_entry(snd_minor_info_oss_entry); - return 0; + if (!entry) + return -ENOMEM; + entry->c.text.read = snd_minor_info_oss_read; + return snd_info_register(entry); /* freed in error path */ } -#endif /* CONFIG_PROC_FS */ - -#endif /* CONFIG_SND_OSSEMUL */ +#endif /* CONFIG_SND_PROC_FS */ -- cgit v1.2.3-54-g00ecf