kill proc_mknod
Subsystems (2)
PATCH 1/1 kill proc_mknod
It's not used anymore since ALSA switched to traditional devices and device nodes in procfs are a bad idea in general..
Also update the docs.
Documentation/DocBook/procfs-guide.tmpl +0 -35
@@ -253,41 +253,6 @@ </para> </sect1> - - - - <sect1> - <title>Creating a device</title> - - <funcsynopsis> - <funcprototype> - <funcdef>struct proc_dir_entry* <function>proc_mknod</function></funcdef> - <paramdef>const char* <parameter>name</parameter></paramdef> - <paramdef>mode_t <parameter>mode</parameter></paramdef> - <paramdef>struct proc_dir_entry* <parameter>parent</parameter></paramdef> - <paramdef>kdev_t <parameter>rdev</parameter></paramdef> - </funcprototype> - </funcsynopsis> - - <para> - Creates a device file <parameter>name</parameter> with mode - <parameter>mode</parameter> in the procfs directory - <parameter>parent</parameter>. The device file will work on - the device <parameter>rdev</parameter>, which can be generated - by using the <literal>MKDEV</literal> macro from - <literal>linux/kdev_t.h</literal>. The - <parameter>mode</parameter> parameter - <emphasis>must</emphasis> contain <constant>S_IFBLK</constant> - or <constant>S_IFCHR</constant> to create a device - node. Compare with userland <literal>mknod - --mode=</literal><parameter>mode</parameter> - <parameter>name</parameter> <parameter>rdev</parameter>. - </para> - </sect1> - - - - <sect1> <title>Creating a directory</title>
Documentation/DocBook/procfs_example.c +1 -11
@@ -63,7 +63,7 @@static struct proc_dir_entry *example_dir, *foo_file, - *bar_file, *jiffies_file, *tty_device, *symlink; + *bar_file, *jiffies_file, *symlink;struct fb_data_t foo_data, bar_data;
@@ -173,16 +173,6 @@ bar_file->write_proc = proc_write_foobar; bar_file->owner =THIS_MODULE ; -/* create tty device */ - tty_device =proc_mknod ("tty" ,S_IFCHR |0666 , - example_dir,MKDEV (5 ,0 )); -if (tty_device ==NULL ) { - rv = -ENOMEM ; - goto no_tty; - } - - tty_device->owner =THIS_MODULE ; -/* create symlink */ symlink =proc_symlink ("jiffies_too" , example_dir,"jiffies" );
fs/proc/generic.c +0 -16
@@ -566,22 +566,6 @@return ent; } -struct proc_dir_entry *proc_mknod (const char *name,mode_t mode, -struct proc_dir_entry *parent,kdev_t rdev) -{ -struct proc_dir_entry *ent; - - ent =proc_create (&parent,name,mode,1 ); -if (ent) { - ent->rdev = rdev; -if (proc_register (parent, ent) <0 ) { -kfree (ent); - ent =NULL ; - } - } -return ent; -} -struct proc_dir_entry *proc_mkdir (const char *name,struct proc_dir_entry *parent) {struct proc_dir_entry *ent;
fs/proc/inode.c +0 -2
@@ -204,8 +204,6 @@ inode->i_op = de->proc_iops;if (de->proc_fops) inode->i_fop = de->proc_fops; -else if (S_ISBLK (de->mode)||S_ISCHR (de->mode)||S_ISFIFO (de->mode)) -init_special_inode (inode,de->mode,kdev_t_to_nr (de->rdev)); } out:
fs/proc/root.c +0 -1
@@ -153,7 +153,6 @@EXPORT_SYMBOL (proc_sys_root);#endif EXPORT_SYMBOL (proc_symlink); -EXPORT_SYMBOL (proc_mknod);EXPORT_SYMBOL (proc_mkdir);EXPORT_SYMBOL (create_proc_entry);EXPORT_SYMBOL (remove_proc_entry);
include/linux/proc_fs.h +0 -5
@@ -71,7 +71,6 @@write_proc_t *write_proc;atomic_t count;/* use count */ int deleted;/* delete flag */ -kdev_t rdev; };struct kcore_list {
@@ -141,8 +140,6 @@extern struct proc_dir_entry *proc_symlink (const char *,struct proc_dir_entry *,const char *); -extern struct proc_dir_entry *proc_mknod (const char *,mode_t , -struct proc_dir_entry *,kdev_t );extern struct proc_dir_entry *proc_mkdir (const char *,struct proc_dir_entry *); static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
@@ -209,8 +206,6 @@static inline struct proc_dir_entry *proc_symlink (const char *name,struct proc_dir_entry *parent,char *dest) {return NULL ;} -static inline struct proc_dir_entry *proc_mknod (const char *name,mode_t mode, -struct proc_dir_entry *parent,kdev_t rdev) {return NULL ;}static inline struct proc_dir_entry *proc_mkdir (const char *name,struct proc_dir_entry *parent) {return NULL ;}