|
@@ -154,11 +154,6 @@ EXPORT_SYMBOL(snd_seq_root);
|
|
struct snd_info_entry *snd_oss_root;
|
|
struct snd_info_entry *snd_oss_root;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
-static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
|
|
|
|
-{
|
|
|
|
- de->owner = THIS_MODULE;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static void snd_remove_proc_entry(struct proc_dir_entry *parent,
|
|
static void snd_remove_proc_entry(struct proc_dir_entry *parent,
|
|
struct proc_dir_entry *de)
|
|
struct proc_dir_entry *de)
|
|
{
|
|
{
|
|
@@ -522,32 +517,11 @@ static const struct file_operations snd_info_entry_operations =
|
|
.release = snd_info_entry_release,
|
|
.release = snd_info_entry_release,
|
|
};
|
|
};
|
|
|
|
|
|
-/**
|
|
|
|
- * snd_create_proc_entry - create a procfs entry
|
|
|
|
- * @name: the name of the proc file
|
|
|
|
- * @mode: the file permission bits, S_Ixxx
|
|
|
|
- * @parent: the parent proc-directory entry
|
|
|
|
- *
|
|
|
|
- * Creates a new proc file entry with the given name and permission
|
|
|
|
- * on the given directory.
|
|
|
|
- *
|
|
|
|
- * Returns the pointer of new instance or NULL on failure.
|
|
|
|
- */
|
|
|
|
-static struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
|
|
|
|
- struct proc_dir_entry *parent)
|
|
|
|
-{
|
|
|
|
- struct proc_dir_entry *p;
|
|
|
|
- p = create_proc_entry(name, mode, parent);
|
|
|
|
- if (p)
|
|
|
|
- snd_info_entry_prepare(p);
|
|
|
|
- return p;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
int __init snd_info_init(void)
|
|
int __init snd_info_init(void)
|
|
{
|
|
{
|
|
struct proc_dir_entry *p;
|
|
struct proc_dir_entry *p;
|
|
|
|
|
|
- p = snd_create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
|
|
|
|
|
|
+ p = create_proc_entry("asound", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
|
|
if (p == NULL)
|
|
if (p == NULL)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
snd_proc_root = p;
|
|
snd_proc_root = p;
|
|
@@ -974,12 +948,11 @@ int snd_info_register(struct snd_info_entry * entry)
|
|
return -ENXIO;
|
|
return -ENXIO;
|
|
root = entry->parent == NULL ? snd_proc_root : entry->parent->p;
|
|
root = entry->parent == NULL ? snd_proc_root : entry->parent->p;
|
|
mutex_lock(&info_mutex);
|
|
mutex_lock(&info_mutex);
|
|
- p = snd_create_proc_entry(entry->name, entry->mode, root);
|
|
|
|
|
|
+ p = create_proc_entry(entry->name, entry->mode, root);
|
|
if (!p) {
|
|
if (!p) {
|
|
mutex_unlock(&info_mutex);
|
|
mutex_unlock(&info_mutex);
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|
|
- p->owner = entry->module;
|
|
|
|
if (!S_ISDIR(entry->mode))
|
|
if (!S_ISDIR(entry->mode))
|
|
p->proc_fops = &snd_info_entry_operations;
|
|
p->proc_fops = &snd_info_entry_operations;
|
|
p->size = entry->size;
|
|
p->size = entry->size;
|