From: David Schleef Date: Thu, 2 May 2002 19:01:21 +0000 (+0000) Subject: Added compat header for devfs on 2.2. kernels X-Git-Tag: r0_7_65~69 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f828ce637427aaf9b210d645dc9d9836d1bbb6e5;p=comedi.git Added compat header for devfs on 2.2. kernels --- diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h new file mode 100644 index 00000000..851191a5 --- /dev/null +++ b/include/linux/devfs_fs_kernel.h @@ -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 + +#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 + +#endif +