From d8deac5094988c7ad1127ee61f52c59a952fcabb Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs from the kernel tree This is the first patch in a series of patches that removes devfs support from the kernel. This patch removes the core devfs code, and its private header file. Signed-off-by: Greg Kroah-Hartman --- include/linux/compat_ioctl.h | 5 ----- include/linux/devfs_fs.h | 41 ----------------------------------------- include/linux/devfs_fs_kernel.h | 18 ------------------ 3 files changed, 64 deletions(-) delete mode 100644 include/linux/devfs_fs.h (limited to 'include') diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 917d62e4148..269d000bb2a 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -567,11 +567,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) -/* DEVFS */ -COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV) -COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK) -COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE) -COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK) /* Raw devices */ COMPATIBLE_IOCTL(RAW_SETBIND) COMPATIBLE_IOCTL(RAW_GETBIND) diff --git a/include/linux/devfs_fs.h b/include/linux/devfs_fs.h deleted file mode 100644 index de236f43187..00000000000 --- a/include/linux/devfs_fs.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _LINUX_DEVFS_FS_H -#define _LINUX_DEVFS_FS_H - -#include - -#define DEVFSD_PROTOCOL_REVISION_KERNEL 5 - -#define DEVFSD_IOCTL_BASE 'd' - -/* These are the various ioctls */ -#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int) -#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int) -#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int) -#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int) - -#define DEVFSD_NOTIFY_REGISTERED 0 -#define DEVFSD_NOTIFY_UNREGISTERED 1 -#define DEVFSD_NOTIFY_ASYNC_OPEN 2 -#define DEVFSD_NOTIFY_CLOSE 3 -#define DEVFSD_NOTIFY_LOOKUP 4 -#define DEVFSD_NOTIFY_CHANGE 5 -#define DEVFSD_NOTIFY_CREATE 6 -#define DEVFSD_NOTIFY_DELETE 7 - -#define DEVFS_PATHLEN 1024 /* Never change this otherwise the - binary interface will change */ - -struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */ - unsigned int type; /* DEVFSD_NOTIFY_* value */ - unsigned int mode; /* Mode of the inode or device entry */ - unsigned int major; /* Major number of device entry */ - unsigned int minor; /* Minor number of device entry */ - unsigned int uid; /* Uid of process, inode or device entry */ - unsigned int gid; /* Gid of process, inode or device entry */ - unsigned int overrun_count; /* Number of lost events */ - unsigned int namelen; /* Number of characters not including '\0' */ - /* The device name MUST come last */ - char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */ -}; - -#endif /* _LINUX_DEVFS_FS_H */ diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index 0d74a6f22ab..ef34d7ffe49 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -4,25 +4,8 @@ #include #include #include - #include -#define DEVFS_SUPER_MAGIC 0x1373 - -#ifdef CONFIG_DEVFS_FS -extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) - __attribute__ ((format(printf, 3, 4))); -extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) - __attribute__ ((format(printf, 3, 4))); -extern int devfs_mk_symlink(const char *name, const char *link); -extern int devfs_mk_dir(const char *fmt, ...) - __attribute__ ((format(printf, 1, 2))); -extern void devfs_remove(const char *fmt, ...) - __attribute__ ((format(printf, 1, 2))); -extern int devfs_register_tape(const char *name); -extern void devfs_unregister_tape(int num); -extern void mount_devfs_fs(void); -#else /* CONFIG_DEVFS_FS */ static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) { return 0; @@ -53,5 +36,4 @@ static inline void mount_devfs_fs(void) { return; } -#endif /* CONFIG_DEVFS_FS */ #endif /* _LINUX_DEVFS_FS_KERNEL_H */ -- cgit v1.2.3 From bdaf8529385d5126ef791e8f1914afff8cd59bcf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs from the init code This patch removes the devfs code from the init/ directory. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index ef34d7ffe49..3dd430e016b 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -32,8 +32,4 @@ static inline int devfs_register_tape(const char *name) static inline void devfs_unregister_tape(int num) { } -static inline void mount_devfs_fs(void) -{ - return; -} #endif /* _LINUX_DEVFS_FS_KERNEL_H */ -- cgit v1.2.3 From aa4148cfc7b3b93eeaf755a7d14f10afaffe9a96 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs support from the serial subsystem Also fixes all serial drivers. Signed-off-by: Greg Kroah-Hartman --- include/linux/serial_core.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 951c4e85827..fc1104a2cfa 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -336,7 +336,6 @@ struct uart_driver { struct module *owner; const char *driver_name; const char *dev_name; - const char *devfs_name; int major; int minor; int nr; -- cgit v1.2.3 From 94f6c59dcf16f10a20fbe3d1f098b159433f94bd Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs support from the ide subsystem. Also removes the ide drive devfs_name field as it's no longer needed Signed-off-by: Greg Kroah-Hartman --- include/linux/ide.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/ide.h b/include/linux/ide.h index ef7bef207f4..eeb52f4b813 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -552,7 +552,6 @@ typedef struct ide_drive_s { struct hd_driveid *id; /* drive model identification info */ struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ struct ide_settings_s *settings;/* /proc/ide/ drive settings */ - char devfs_name[64]; /* devfs crap */ struct hwif_s *hwif; /* actually (ide_hwif_t *) */ -- cgit v1.2.3 From 0e6c62da7cd929b0389fc4a7e41464bb738647dc Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_*_tape() functions from the kernel tree Removes the devfs_register_tape() and devfs_unregister_tape() functions and all callers of them. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index 3dd430e016b..d1dd876bc1a 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -25,11 +25,4 @@ static inline int devfs_mk_dir(const char *fmt, ...) static inline void devfs_remove(const char *fmt, ...) { } -static inline int devfs_register_tape(const char *name) -{ - return -1; -} -static inline void devfs_unregister_tape(int num) -{ -} #endif /* _LINUX_DEVFS_FS_KERNEL_H */ -- cgit v1.2.3 From 95dc112a5770dc670a1b45a3d9ee346fdd2b2697 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree Removes the devfs_mk_dir() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index d1dd876bc1a..ef8766e172e 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -18,10 +18,6 @@ static inline int devfs_mk_symlink(const char *name, const char *link) { return 0; } -static inline int devfs_mk_dir(const char *fmt, ...) -{ - return 0; -} static inline void devfs_remove(const char *fmt, ...) { } -- cgit v1.2.3 From 79021a625c36162d24c852bbbdb04f0c1cb32db3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_symlink() function from the kernel tree Removes the devfs_mk_symlink() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index ef8766e172e..da336a3c6c7 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -14,10 +14,6 @@ static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) { return 0; } -static inline int devfs_mk_symlink(const char *name, const char *link) -{ - return 0; -} static inline void devfs_remove(const char *fmt, ...) { } -- cgit v1.2.3 From 1a715c5cf917326a285533d1116d725f5f2593c2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_bdev() function from the kernel tree Removes the devfs_mk_bdev() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index da336a3c6c7..6d9f003dbce 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -6,10 +6,6 @@ #include #include -static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) -{ - return 0; -} static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) { return 0; -- cgit v1.2.3 From 7c69ef79741910883d5543caafa06aca3ebadbd1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree Removes the devfs_mk_cdev() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index 6d9f003dbce..c7d05dbc2af 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -6,10 +6,6 @@ #include #include -static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) -{ - return 0; -} static inline void devfs_remove(const char *fmt, ...) { } -- cgit v1.2.3 From 8ab5e4c15b53e147c08031a959d9f776823dbe73 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove devfs_remove() function from the kernel tree Removes the devfs_remove() function and all callers of it. Signed-off-by: Greg Kroah-Hartman --- include/linux/devfs_fs_kernel.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h index c7d05dbc2af..2036d2e9098 100644 --- a/include/linux/devfs_fs_kernel.h +++ b/include/linux/devfs_fs_kernel.h @@ -6,7 +6,4 @@ #include #include -static inline void devfs_remove(const char *fmt, ...) -{ -} #endif /* _LINUX_DEVFS_FS_KERNEL_H */ -- cgit v1.2.3 From ff23eca3e8f613034e0d20ff86f6a89b62f5a14e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the devfs_fs_kernel.h file from the tree Also fixes up all files that #include it. Signed-off-by: Greg Kroah-Hartman --- include/asm-ppc/ocp.h | 1 - include/linux/devfs_fs_kernel.h | 9 --------- include/linux/fb.h | 1 - 3 files changed, 11 deletions(-) delete mode 100644 include/linux/devfs_fs_kernel.h (limited to 'include') diff --git a/include/asm-ppc/ocp.h b/include/asm-ppc/ocp.h index 3be5d760ffc..16dbc7d1745 100644 --- a/include/asm-ppc/ocp.h +++ b/include/asm-ppc/ocp.h @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h deleted file mode 100644 index 2036d2e9098..00000000000 --- a/include/linux/devfs_fs_kernel.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef _LINUX_DEVFS_FS_KERNEL_H -#define _LINUX_DEVFS_FS_KERNEL_H - -#include -#include -#include -#include - -#endif /* _LINUX_DEVFS_FS_KERNEL_H */ diff --git a/include/linux/fb.h b/include/linux/fb.h index 07a08e92bc7..b45928f5c63 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -380,7 +380,6 @@ struct fb_cursor { #include #include #include -#include #include #include #include -- cgit v1.2.3 From 96192ff1a9d0c6ef365d21667080259d83ea2f5b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the miscdevice devfs_name field as it's no longer needed Also fixes all drivers that set this field. Signed-off-by: Greg Kroah-Hartman --- include/linux/miscdevice.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 5b584dafb5a..b03cfb91e22 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h @@ -40,7 +40,6 @@ struct miscdevice { struct list_head list; struct device *dev; struct class_device *class; - char devfs_name[64]; }; extern int misc_register(struct miscdevice * misc); -- cgit v1.2.3 From ce7b0f46bbf4bff8daab2dd3d878b9e72a623d09 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the gendisk devfs_name field as it's no longer needed And remove the now unneeded number field. Also fixes all drivers that set these fields. Signed-off-by: Greg Kroah-Hartman --- include/linux/genhd.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 3498a0c6818..e4af57e87c1 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -112,8 +112,6 @@ struct gendisk { sector_t capacity; int flags; - char devfs_name[64]; /* devfs crap */ - int number; /* more of the same */ struct device *driverfs_dev; struct kobject kobj; struct kobject *holder_dir; -- cgit v1.2.3 From 5e483075a1f9862a65af648d1d939499969c7b5d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the videodevice devfs_name field as it's no longer needed Also fixes all drivers that set this field. Signed-off-by: Greg Kroah-Hartman --- include/media/v4l2-dev.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index a1b473190e6..62dae1a8c44 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -314,7 +314,6 @@ void *priv; /* for videodev.c intenal usage -- please don't touch */ int users; /* video_exclusive_{open|close} ... */ struct mutex lock; /* ... helper function uses these */ - char devfs_name[64]; /* devfs */ struct class_device class_dev; /* sysfs */ }; -- cgit v1.2.3 From f4eaa37017a5a68f67ef86729508022c13fb8e6d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Remove the tty_driver devfs_name field as it's no longer needed Also fixes all drivers that set this field. Signed-off-by: Greg Kroah-Hartman --- include/linux/tty_driver.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index b368b296d03..0bd31f0830f 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -157,7 +157,6 @@ struct tty_driver { struct cdev cdev; struct module *owner; const char *driver_name; - const char *devfs_name; const char *name; int name_base; /* offset of printed name */ int major; /* major device number */ -- cgit v1.2.3 From 331b831983f9d706f4a40d08a996d5c2c7a6ea7b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 20 Jun 2005 21:15:16 -0700 Subject: [PATCH] devfs: Rename TTY_DRIVER_NO_DEVFS to TTY_DRIVER_DYNAMIC_DEV I've always found this flag confusing. Now that devfs is no longer around, it has been renamed, and the documentation for when this flag should be used has been updated. Also fixes all drivers that use this flag. Signed-off-by: Greg Kroah-Hartman --- include/linux/tty_driver.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 0bd31f0830f..58c961c9e17 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -241,8 +241,15 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); * is also a promise, if the above case is true, not to signal * overruns, either.) * - * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This - * is only used by tty_register_driver(). + * TTY_DRIVER_DYNAMIC_DEV --- if set, the individual tty devices need + * to be registered with a call to tty_register_driver() when the + * device is found in the system and unregistered with a call to + * tty_unregister_device() so the devices will be show up + * properly in sysfs. If not set, driver->num entries will be + * created by the tty core in sysfs when tty_register_driver() is + * called. This is to be used by drivers that have tty devices + * that can appear and disappear while the main tty driver is + * registered with the tty core. * * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead * use dynamic memory keyed through the devpts filesystem. This @@ -251,7 +258,7 @@ void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); #define TTY_DRIVER_INSTALLED 0x0001 #define TTY_DRIVER_RESET_TERMIOS 0x0002 #define TTY_DRIVER_REAL_RAW 0x0004 -#define TTY_DRIVER_NO_DEVFS 0x0008 +#define TTY_DRIVER_DYNAMIC_DEV 0x0008 #define TTY_DRIVER_DEVPTS_MEM 0x0010 /* tty driver types */ -- cgit v1.2.3