diff options
author | David Howells <dhowells@redhat.com> | 2013-04-11 21:29:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-05-01 17:29:40 -0400 |
commit | 34db8aaf0f95ffac407d39da22972b38da631db4 (patch) | |
tree | dd9e9cf4e7882a800ad0d3b7bb1ea9ae4d4515cd /include | |
parent | 4abfd0298900851930310e5d736a7f3a105089ec (diff) |
proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h}
Move some bits from linux/proc_fs.h to linux/of.h, signal.h and tty.h.
Also move proc_tty_init() and proc_device_tree_init() to fs/proc/internal.h as
they're internal to procfs.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
cc: devicetree-discuss@lists.ozlabs.org
cc: linux-arch@vger.kernel.org
cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cc: Jri Slaby <jslaby@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/of.h | 10 | ||||
-rw-r--r-- | include/linux/proc_fs.h | 37 | ||||
-rw-r--r-- | include/linux/signal.h | 5 | ||||
-rw-r--r-- | include/linux/tty.h | 7 |
4 files changed, 22 insertions, 37 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index a0f129284948..2d25ff8fe39a 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -540,4 +540,14 @@ static inline int of_property_read_u32(const struct device_node *np, | |||
540 | return of_property_read_u32_array(np, propname, out_value, 1); | 540 | return of_property_read_u32_array(np, propname, out_value, 1); |
541 | } | 541 | } |
542 | 542 | ||
543 | #if defined(CONFIG_PROC_FS) && defined(CONFIG_PROC_DEVICETREE) | ||
544 | extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *); | ||
545 | extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop); | ||
546 | extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde, | ||
547 | struct property *prop); | ||
548 | extern void proc_device_tree_update_prop(struct proc_dir_entry *pde, | ||
549 | struct property *newprop, | ||
550 | struct property *oldprop); | ||
551 | #endif | ||
552 | |||
543 | #endif /* _LINUX_OF_H */ | 553 | #endif /* _LINUX_OF_H */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 33772248a3b1..80d9e24a79ac 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -70,36 +70,6 @@ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | |||
70 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); | 70 | extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); |
71 | extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent); | 71 | extern int remove_proc_subtree(const char *name, struct proc_dir_entry *parent); |
72 | 72 | ||
73 | |||
74 | /* | ||
75 | * proc_tty.c | ||
76 | */ | ||
77 | struct tty_driver; | ||
78 | #ifdef CONFIG_TTY | ||
79 | extern void proc_tty_init(void); | ||
80 | #else | ||
81 | static inline void proc_tty_init(void) | ||
82 | { } | ||
83 | #endif | ||
84 | extern void proc_tty_register_driver(struct tty_driver *driver); | ||
85 | extern void proc_tty_unregister_driver(struct tty_driver *driver); | ||
86 | |||
87 | /* | ||
88 | * proc_devtree.c | ||
89 | */ | ||
90 | #ifdef CONFIG_PROC_DEVICETREE | ||
91 | struct device_node; | ||
92 | struct property; | ||
93 | extern void proc_device_tree_init(void); | ||
94 | extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *); | ||
95 | extern void proc_device_tree_add_prop(struct proc_dir_entry *pde, struct property *prop); | ||
96 | extern void proc_device_tree_remove_prop(struct proc_dir_entry *pde, | ||
97 | struct property *prop); | ||
98 | extern void proc_device_tree_update_prop(struct proc_dir_entry *pde, | ||
99 | struct property *newprop, | ||
100 | struct property *oldprop); | ||
101 | #endif /* CONFIG_PROC_DEVICETREE */ | ||
102 | |||
103 | extern struct proc_dir_entry *proc_symlink(const char *, | 73 | extern struct proc_dir_entry *proc_symlink(const char *, |
104 | struct proc_dir_entry *, const char *); | 74 | struct proc_dir_entry *, const char *); |
105 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); | 75 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); |
@@ -143,10 +113,6 @@ static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, | |||
143 | static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {} | 113 | static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {} |
144 | static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} | 114 | static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} |
145 | 115 | ||
146 | struct tty_driver; | ||
147 | static inline void proc_tty_register_driver(struct tty_driver *driver) {}; | ||
148 | static inline void proc_tty_unregister_driver(struct tty_driver *driver) {}; | ||
149 | |||
150 | #endif /* CONFIG_PROC_FS */ | 116 | #endif /* CONFIG_PROC_FS */ |
151 | 117 | ||
152 | 118 | ||
@@ -187,7 +153,4 @@ static inline void *PDE_DATA(const struct inode *inode) | |||
187 | return PROC_I(inode)->pde->data; | 153 | return PROC_I(inode)->pde->data; |
188 | } | 154 | } |
189 | 155 | ||
190 | #include <linux/signal.h> | ||
191 | |||
192 | void render_sigset_t(struct seq_file *m, const char *header, sigset_t *set); | ||
193 | #endif /* _LINUX_PROC_FS_H */ | 156 | #endif /* _LINUX_PROC_FS_H */ |
diff --git a/include/linux/signal.h b/include/linux/signal.h index a2dcb94ea49d..1135e3696e81 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -434,4 +434,9 @@ void signals_init(void); | |||
434 | int restore_altstack(const stack_t __user *); | 434 | int restore_altstack(const stack_t __user *); |
435 | int __save_altstack(stack_t __user *, unsigned long); | 435 | int __save_altstack(stack_t __user *, unsigned long); |
436 | 436 | ||
437 | #ifdef CONFIG_PROC_FS | ||
438 | struct seq_file; | ||
439 | extern void render_sigset_t(struct seq_file *, const char *, sigset_t *); | ||
440 | #endif | ||
441 | |||
437 | #endif /* _LINUX_SIGNAL_H */ | 442 | #endif /* _LINUX_SIGNAL_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index c75d886b0307..e014fb1a84bd 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -658,5 +658,12 @@ do { \ | |||
658 | finish_wait(&wq, &__wait); \ | 658 | finish_wait(&wq, &__wait); \ |
659 | } while (0) | 659 | } while (0) |
660 | 660 | ||
661 | #ifdef CONFIG_PROC_FS | ||
662 | extern void proc_tty_register_driver(struct tty_driver *); | ||
663 | extern void proc_tty_unregister_driver(struct tty_driver *); | ||
664 | #else | ||
665 | static inline void proc_tty_register_driver(struct tty_driver *d) {} | ||
666 | static inline void proc_tty_unregister_driver(struct tty_driver *d) {} | ||
667 | #endif | ||
661 | 668 | ||
662 | #endif | 669 | #endif |