Don't include linux/config.h from anywhere else in include/
[powerpc.git] / include / linux / devfs_fs_kernel.h
1 #ifndef _LINUX_DEVFS_FS_KERNEL_H
2 #define _LINUX_DEVFS_FS_KERNEL_H
3
4 #include <linux/fs.h>
5 #include <linux/spinlock.h>
6 #include <linux/types.h>
7
8 #include <asm/semaphore.h>
9
10 #define DEVFS_SUPER_MAGIC                0x1373
11
12 #ifdef CONFIG_DEVFS_FS
13 extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
14     __attribute__ ((format(printf, 3, 4)));
15 extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
16     __attribute__ ((format(printf, 3, 4)));
17 extern int devfs_mk_symlink(const char *name, const char *link);
18 extern int devfs_mk_dir(const char *fmt, ...)
19     __attribute__ ((format(printf, 1, 2)));
20 extern void devfs_remove(const char *fmt, ...)
21     __attribute__ ((format(printf, 1, 2)));
22 extern int devfs_register_tape(const char *name);
23 extern void devfs_unregister_tape(int num);
24 extern void mount_devfs_fs(void);
25 #else                           /*  CONFIG_DEVFS_FS  */
26 static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
27 {
28         return 0;
29 }
30 static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
31 {
32         return 0;
33 }
34 static inline int devfs_mk_symlink(const char *name, const char *link)
35 {
36         return 0;
37 }
38 static inline int devfs_mk_dir(const char *fmt, ...)
39 {
40         return 0;
41 }
42 static inline void devfs_remove(const char *fmt, ...)
43 {
44 }
45 static inline int devfs_register_tape(const char *name)
46 {
47         return -1;
48 }
49 static inline void devfs_unregister_tape(int num)
50 {
51 }
52 static inline void mount_devfs_fs(void)
53 {
54         return;
55 }
56 #endif                          /*  CONFIG_DEVFS_FS  */
57 #endif                          /*  _LINUX_DEVFS_FS_KERNEL_H  */