From e09b41010ba33a20a87472ee821fa407a5b8da36 Mon Sep 17 00:00:00 2001 From: José Pekkarinen Date: Mon, 11 Apr 2016 10:41:07 +0300 Subject: These changes are the raw update to linux-4.4.6-rt14. Kernel sources are taken from kernel.org, and rt patch from the rt wiki download page. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit During the rebasing, the following patch collided: Force tick interrupt and get rid of softirq magic(I70131fb85). Collisions have been removed because its logic was found on the source already. Change-Id: I7f57a4081d9deaa0d9ccfc41a6c8daccdee3b769 Signed-off-by: José Pekkarinen --- kernel/sound/core/init.c | 62 ++++++++++++++---------------------------------- 1 file changed, 18 insertions(+), 44 deletions(-) (limited to 'kernel/sound/core/init.c') diff --git a/kernel/sound/core/init.c b/kernel/sound/core/init.c index 04734e047..20f37fb38 100644 --- a/kernel/sound/core/init.c +++ b/kernel/sound/core/init.c @@ -100,35 +100,28 @@ int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag); EXPORT_SYMBOL(snd_mixer_oss_notify_callback); #endif -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS static void snd_card_id_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { snd_iprintf(buffer, "%s\n", entry->card->id); } -static inline int init_info_for_card(struct snd_card *card) +static int init_info_for_card(struct snd_card *card) { - int err; struct snd_info_entry *entry; - if ((err = snd_info_card_register(card)) < 0) { - dev_dbg(card->dev, "unable to create card info\n"); - return err; - } - if ((entry = snd_info_create_card_entry(card, "id", card->proc_root)) == NULL) { + entry = snd_info_create_card_entry(card, "id", card->proc_root); + if (!entry) { dev_dbg(card->dev, "unable to create card entry\n"); - return err; + return -ENOMEM; } entry->c.text.read = snd_card_id_read; - if (snd_info_register(entry) < 0) { - snd_info_free_entry(entry); - entry = NULL; - } card->proc_id = entry; - return 0; + + return snd_info_card_register(card); } -#else /* !CONFIG_PROC_FS */ +#else /* !CONFIG_SND_PROC_FS */ #define init_info_for_card(card) #endif @@ -756,7 +749,7 @@ int snd_card_register(struct snd_card *card) if (snd_cards[card->number]) { /* already registered */ mutex_unlock(&snd_card_mutex); - return 0; + return snd_info_card_register(card); /* register pending info */ } if (*card->id) { /* make a unique id name from the given string */ @@ -782,9 +775,7 @@ int snd_card_register(struct snd_card *card) EXPORT_SYMBOL(snd_card_register); -#ifdef CONFIG_PROC_FS -static struct snd_info_entry *snd_card_info_entry; - +#ifdef CONFIG_SND_PROC_FS static void snd_card_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -810,7 +801,6 @@ static void snd_card_info_read(struct snd_info_entry *entry, } #ifdef CONFIG_SND_OSSEMUL - void snd_card_info_read_oss(struct snd_info_buffer *buffer) { int idx, count; @@ -832,7 +822,6 @@ void snd_card_info_read_oss(struct snd_info_buffer *buffer) #endif #ifdef MODULE -static struct snd_info_entry *snd_card_module_info_entry; static void snd_card_module_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -857,36 +846,21 @@ int __init snd_card_info_init(void) if (! entry) return -ENOMEM; entry->c.text.read = snd_card_info_read; - if (snd_info_register(entry) < 0) { - snd_info_free_entry(entry); - return -ENOMEM; - } - snd_card_info_entry = entry; + if (snd_info_register(entry) < 0) + return -ENOMEM; /* freed in error path */ #ifdef MODULE entry = snd_info_create_module_entry(THIS_MODULE, "modules", NULL); - if (entry) { - entry->c.text.read = snd_card_module_info_read; - if (snd_info_register(entry) < 0) - snd_info_free_entry(entry); - else - snd_card_module_info_entry = entry; - } + if (!entry) + return -ENOMEM; + entry->c.text.read = snd_card_module_info_read; + if (snd_info_register(entry) < 0) + return -ENOMEM; /* freed in error path */ #endif return 0; } - -int __exit snd_card_info_done(void) -{ - snd_info_free_entry(snd_card_info_entry); -#ifdef MODULE - snd_info_free_entry(snd_card_module_info_entry); -#endif - return 0; -} - -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_SND_PROC_FS */ /** * snd_component_add - add a component string -- cgit 1.2.3-korg