Added compat header for devfs on 2.2. kernels
authorDavid Schleef <ds@schleef.org>
Thu, 2 May 2002 19:01:21 +0000 (19:01 +0000)
committerDavid Schleef <ds@schleef.org>
Thu, 2 May 2002 19:01:21 +0000 (19:01 +0000)
include/linux/devfs_fs_kernel.h [new file with mode: 0644]

diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
new file mode 100644 (file)
index 0000000..851191a
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * linux/devfs_fs_kernel.h compatibility header
+ */
+
+#ifndef __COMPAT_LINUX_DEVFS_FS_KERNEL_H_
+#define __COMPAT_LINUX_DEVFS_FS_KERNEL_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < 0x020400
+
+typedef struct devfs_entry * devfs_handle_t;
+
+static inline int devfs_register_chrdev (unsigned int major, const char *name,
+       struct file_operations *fops)
+{
+       return register_chrdev (major, name, fops);
+}   
+
+static inline int devfs_unregister_chrdev (unsigned int major,const char *name)
+{
+       return unregister_chrdev (major, name);
+}
+
+static inline devfs_handle_t devfs_register (devfs_handle_t dir,
+       const char *name, unsigned int flags, unsigned int major,
+       unsigned int minor, umode_t mode, void *ops, void *info)
+{
+       return NULL;
+}
+
+static inline void devfs_unregister (devfs_handle_t de)
+{
+}
+
+static inline devfs_handle_t devfs_get_handle (devfs_handle_t dir,
+       const char *name, unsigned int major, unsigned int minor,
+       char type, int traverse_symlinks)
+{
+           return NULL;
+}
+
+#endif
+
+#include_next <linux/devfs_fs_kernel.h>
+
+#endif
+