}
static struct snd_info_entry *
-snd_info_create_entry(const char *name, struct snd_info_entry *parent);
+snd_info_create_entry(const char *name, struct snd_info_entry *parent,
+ struct module *module);
int __init snd_info_init(void)
{
- snd_proc_root = snd_info_create_entry("asound", NULL);
+ snd_proc_root = snd_info_create_entry("asound", NULL, THIS_MODULE);
if (!snd_proc_root)
return -ENOMEM;
snd_proc_root->mode = S_IFDIR | 0555;
* Return: The pointer of the new instance, or %NULL on failure.
*/
static struct snd_info_entry *
-snd_info_create_entry(const char *name, struct snd_info_entry *parent)
+snd_info_create_entry(const char *name, struct snd_info_entry *parent,
+ struct module *module)
{
struct snd_info_entry *entry;
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
INIT_LIST_HEAD(&entry->children);
INIT_LIST_HEAD(&entry->list);
entry->parent = parent;
+ entry->module = module;
if (parent)
list_add_tail(&entry->list, &parent->children);
return entry;
const char *name,
struct snd_info_entry *parent)
{
- struct snd_info_entry *entry;
-
if (!parent)
parent = snd_proc_root;
- entry = snd_info_create_entry(name, parent);
- if (entry)
- entry->module = module;
- return entry;
+ return snd_info_create_entry(name, parent, module);
}
EXPORT_SYMBOL(snd_info_create_module_entry);
const char *name,
struct snd_info_entry * parent)
{
- struct snd_info_entry *entry;
-
if (!parent)
parent = card->proc_root;
- entry = snd_info_create_entry(name, parent);
- if (entry)
- entry->module = card->module;
- return entry;
+ return snd_info_create_entry(name, parent, card->module);
}
EXPORT_SYMBOL(snd_info_create_card_entry);