Last little devfs cleanups throughout the kernel tree.
Subsystems (45)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 Remove devfs from the partition code
This patch removes the devfs code from the fs/partitions/ directory.
--- fs/partitions/Makefile | 1 fs/partitions/check.c | 26 +-------- fs/partitions/devfs.c | 130 ------------------------------------------------- fs/partitions/devfs.h | 10 --- 4 files changed, 5 insertions(+), 162 deletions(-)
fs/partitions/devfs.c deleted +0 -130
@@ -1,130 +0,0 @@ -/* -* This tries to keep block devices away from devfs as much as possible. -*/ -#include <linux/fs.h> -#include <linux/devfs_fs_kernel.h> -#include <linux/vmalloc.h> -#include <linux/genhd.h> -#include <linux/bitops.h> -#include <asm/semaphore.h> - - -struct unique_numspace { -u32 num_free;/* Num free in bits */ -u32 length;/* Array length in bytes */ -unsigned long *bits; -struct semaphore mutex; -}; - -static DECLARE_MUTEX (numspace_mutex); - -static int expand_numspace (struct unique_numspace *s) -{ -u32 length; -void *bits; - -if (s->length <16 ) - length =16 ; -else - length = s->length <<1 ; - - bits =vmalloc (length); -if (!bits) -return -ENOMEM ; -if (s->bits) { -memcpy (bits, s->bits, s->length); -vfree (s->bits); - } - - s->num_free = (length - s->length) <<3 ; - s->bits = bits; -memset (bits + s->length,0 , length - s->length); - s->length = length; - -return 0 ; -} - -static int alloc_unique_number (struct unique_numspace *s) -{ -int rval =0 ; - -down (&numspace_mutex); -if (s->num_free <1 ) - rval =expand_numspace (s); -if (!rval) { - rval =find_first_zero_bit (s->bits, s->length <<3 ); - --s->num_free; -__set_bit (rval, s->bits); - } -up (&numspace_mutex); - -return rval; -} - -static void dealloc_unique_number (struct unique_numspace *s,int number) -{ -int old_val; - -if (number >=0 ) { -down (&numspace_mutex); - old_val =__test_and_clear_bit (number, s->bits); -if (old_val) - ++s->num_free; -up (&numspace_mutex); - } -} - -static struct unique_numspace disc_numspace; -static struct unique_numspace cdrom_numspace; - -void devfs_add_partitioned (struct gendisk *disk) -{ -char dirname[64 ], symlink[16 ]; - -devfs_mk_dir (disk->devfs_name); -devfs_mk_bdev (MKDEV (disk->major, disk->first_minor), -S_IFBLK |S_IRUSR |S_IWUSR , -"%s/disc" , disk->devfs_name); - - disk->number =alloc_unique_number (&disc_numspace); - -sprintf (symlink,"discs/disc%d" , disk->number); -sprintf (dirname,"../%s" , disk->devfs_name); -devfs_mk_symlink (symlink, dirname); - -} - -void devfs_add_disk (struct gendisk *disk) -{ -devfs_mk_bdev (MKDEV (disk->major, disk->first_minor), - (disk->flags &GENHD_FL_CD ) ? -S_IFBLK |S_IRUGO |S_IWUGO : -S_IFBLK |S_IRUSR |S_IWUSR , -"%s" , disk->devfs_name); - -if (disk->flags &GENHD_FL_CD ) { -char dirname[64 ], symlink[16 ]; - - disk->number =alloc_unique_number (&cdrom_numspace); - -sprintf (symlink,"cdroms/cdrom%d" , disk->number); -sprintf (dirname,"../%s" , disk->devfs_name); -devfs_mk_symlink (symlink, dirname); - } -} - -void devfs_remove_disk (struct gendisk *disk) -{ -if (disk->minors !=1 ) { -devfs_remove ("discs/disc%d" , disk->number); -dealloc_unique_number (&disc_numspace, disk->number); -devfs_remove ("%s/disc" , disk->devfs_name); - } -if (disk->flags &GENHD_FL_CD ) { -devfs_remove ("cdroms/cdrom%d" , disk->number); -dealloc_unique_number (&cdrom_numspace, disk->number); - } -devfs_remove (disk->devfs_name); -} - -
fs/partitions/devfs.h deleted +0 -10
@@ -1,10 +0,0 @@ - -#ifdef CONFIG_DEVFS_FS -void devfs_add_disk (struct gendisk *dev); -void devfs_add_partitioned (struct gendisk *dev); -void devfs_remove_disk (struct gendisk *dev); -#else -# define devfs_add_disk (disk) do { } while (0) -# define devfs_add_partitioned (disk) do { } while (0) -# define devfs_remove_disk (disk) do { } while (0) -#endif
fs/partitions/Makefile +0 -1
@@ -4,7 +4,6 @@ obj-y := check.o -obj-$(CONFIG_DEVFS_FS) += devfs.o obj-$(CONFIG_ACORN_PARTITION) += acorn.o obj-$(CONFIG_AMIGA_PARTITION) += amiga.o obj-$(CONFIG_ATARI_PARTITION) += atari.o
fs/partitions/check.c +5 -21
@@ -21,7 +21,6 @@#include <linux/devfs_fs_kernel.h> #include "check.h" -#include "devfs.h" #include "acorn.h" #include "amiga.h"
@@ -160,18 +159,11 @@if (!state)return NULL ; -#ifdef CONFIG_DEVFS_FS -if (hd->devfs_name[0 ] !='\0' ) { -printk (KERN_INFO " /dev/%s:" , hd->devfs_name); +disk_name (hd,0 , state->name); +printk (KERN_INFO " %s:" , state->name); +if (isdigit (state->name[strlen (state->name)-1 ]))sprintf (state->name,"p" ); - } -#endif - else { -disk_name (hd,0 , state->name); -printk (KERN_INFO " %s:" , state->name); -if (isdigit (state->name[strlen (state->name)-1 ])) -sprintf (state->name,"p" ); - } + state->limit = hd->minors; i = res =0 ;while (!res && check_part[i]) {
@@ -340,14 +332,8 @@kobject_hotplug (&disk->kobj,KOBJ_ADD );/* No minors to use for partitions */ -if (disk->minors ==1 ) { -if (disk->devfs_name[0 ] !='\0' ) -devfs_add_disk (disk); +if (disk->minors ==1 )return ; - } - -/* always add handle for the whole disk */ -devfs_add_partitioned (disk);/* No such device (e.g., media were just removed) */ if (!get_capacity (disk))
@@ -435,8 +421,6 @@disk_stat_set_all (disk,0 ); disk->stamp = disk->stamp_idle =0 ; -devfs_remove_disk (disk); -if (disk->driverfs_dev) {sysfs_remove_link (&disk->kobj,"device" );sysfs_remove_link (&disk->driverfs_dev->kobj,"block" );
PATCH 1/1 Remove devfs from the init code
This patch removes the devfs code from the init/ directory.
--- include/linux/devfs_fs_kernel.h | 4 - init/Makefile | 1 init/do_mounts.c | 8 -- init/do_mounts.h | 15 ---- init/do_mounts_devfs.c | 137 ---------------------------------------- init/do_mounts_initrd.c | 6 - init/do_mounts_md.c | 5 - 7 files changed, 7 insertions(+), 169 deletions(-)
init/Makefile +0 -1
@@ -6,7 +6,6 @@ obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o mounts-y := do_mounts.o -mounts-$(CONFIG_DEVFS_FS) += do_mounts_devfs.o mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o
init/do_mounts_devfs.c deleted +0 -137
137 lines not on this page · raw message
init/do_mounts.c +2 -6
@@ -322,7 +322,7 @@ {void *data =nfs_root_data (); -create_dev ("/dev/root" ,ROOT_DEV ,NULL ); +create_dev ("/dev/root" ,ROOT_DEV );if (data &&do_mount_root ("/dev/root" ,"nfs" , root_mountflags, data) ==0 )return 1 ;
@@ -383,7 +383,7 @@ change_floppy("root floppy"); }#endif -create_dev ("/dev/root" ,ROOT_DEV , root_device_name); +create_dev ("/dev/root" ,ROOT_DEV );mount_block_root ("/dev/root" , root_mountflags); }
@@ -394,8 +394,6 @@ {int is_floppy; -mount_devfs (); -if (root_delay) {printk (KERN_INFO "Waiting %dsec before mounting root device...\n" , root_delay);
@@ -421,10 +419,8 @@mount_root (); out: -umount_devfs ("/dev" );sys_mount ("." ,"/" ,NULL ,MS_MOVE ,NULL );sys_chroot ("." );security_sb_post_mountroot (); -mount_devfs_fs (); }
init/do_mounts.h +1 -14
@@ -16,25 +16,12 @@extern int root_mountflags;extern char *root_device_name; -#ifdef CONFIG_DEVFS_FS - -void mount_devfs (void ); -void umount_devfs (char *path); -int create_dev (char *name,dev_t dev,char *devfs_name); - -#else - -static inline void mount_devfs (void ) {} -static inline void umount_devfs (const char *path) {} - -static inline int create_dev (char *name,dev_t dev,char *devfs_name) +static inline int create_dev (char *name,dev_t dev) {sys_unlink (name);return sys_mknod (name,S_IFBLK |0600 ,new_encode_dev (dev)); } -#endif -#if BITS_PER_LONG ==32 static inline u32 bstat (char *name) {
init/do_mounts_initrd.c +2 -4
@@ -44,7 +44,7 @@int i, pid; real_root_dev =new_encode_dev (ROOT_DEV ); -create_dev ("/dev/root.old" , Root_RAM0,NULL ); +create_dev ("/dev/root.old" , Root_RAM0);/* mount initrd on rootfs' /root */ mount_block_root ("/dev/root.old" , root_mountflags & ~MS_RDONLY );sys_mkdir ("/old" ,0700 );
@@ -54,7 +54,6 @@sys_chdir ("/root" );sys_mount ("." ,"/" ,NULL ,MS_MOVE ,NULL );sys_chroot ("." ); -mount_devfs_fs (); pid =kernel_thread (do_linuxrc,"/linuxrc" ,SIGCHLD );if (pid >0 ) {
@@ -70,7 +69,6 @@sys_chroot ("." );sys_close (old_fd);sys_close (root_fd); -umount_devfs ("/old/dev" );if (new_decode_dev (real_root_dev) == Root_RAM0) {sys_chdir ("/old" );
@@ -103,7 +101,7 @@int __init initrd_load (void ) {if (mount_initrd) { -create_dev ("/dev/ram" , Root_RAM0,NULL ); +create_dev ("/dev/ram" , Root_RAM0);/* * Load the initrd data into /dev/ram0. Execute it as initrd * unless /dev/ram0 is supposed to be our actual root device,
include/linux/devfs_fs_kernel.h +0 -4
@@ -33,8 +33,4 @@static inline void devfs_unregister_tape (int num) { } -static inline void mount_devfs_fs (void ) -{ -return ; -}#endif /* _LINUX_DEVFS_FS_KERNEL_H */
init/do_mounts_md.c +2 -3
@@ -129,19 +129,18 @@int err =0 ;char *devname;mdu_disk_info_t dinfo; -char name[16 ], devfs_name[16 ]; +char name[16 ]; minor = md_setup_args[ent].minor; partitioned = md_setup_args[ent].partitioned; devname = md_setup_args[ent].device_names;sprintf (name,"/dev/md%s%d" , partitioned?"_d" :"" , minor); -sprintf (devfs_name,"/dev/md/%s%d" , partitioned?"d" :"" , minor);if (partitioned) dev =MKDEV (mdp_major, minor << MdpMinorShift);else dev =MKDEV (MD_MAJOR , minor); -create_dev (name, dev, devfs_name); +create_dev (name, dev);for (i =0 ; i <MD_SB_DISKS && devname !=0 ; i++) {char *p;char comp_name[64 ];
PATCH 1/1 Remove devfs_*_tape() functions from the kernel tree
Removes the devfs_register_tape() and devfs_unregister_tape() functions and all callers of them.
--- drivers/char/viotape.c | 3 --- drivers/ide/ide-tape.c | 3 +-- drivers/scsi/osst.c | 3 +-- drivers/scsi/st.c | 3 +-- include/linux/devfs_fs_kernel.h | 7 ------- 5 files changed, 3 insertions(+), 16 deletions(-)
include/linux/devfs_fs_kernel.h +0 -7
@@ -26,11 +26,4 @@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 */
drivers/scsi/st.c +1 -2
@@ -3997,7 +3997,7 @@S_IFCHR |S_IRUGO |S_IWUGO , "%s/mt%sn", SDp->devfs_name, st_formats[i]); } - disk->number =devfs_register_tape (SDp->devfs_name); + disk->number =-1 ; printk(KERN_WARNING "Attached scsi tape %s at scsi%d, channel %d, id %d, lun %d\n",
@@ -4054,7 +4054,6 @@ scsi_tapes[i] =NULL ; st_nr_dev--;write_unlock (&st_dev_arr_lock); -devfs_unregister_tape (tpnt->disk->number);sysfs_remove_link (&tpnt->device->sdev_gendev.kobj,"tape" );for (mode =0 ; mode <ST_NBR_MODES ; ++mode) {
drivers/char/viotape.c +0 -3
@@ -247,7 +247,6 @@*/ static struct {unsigned char cur_part; -int dev_handle;unsigned char part_stat_rwi[MAX_PARTITIONS ]; } state[VIOTAPE_MAX_TAPE ];
@@ -965,7 +964,6 @@devfs_mk_cdev (MKDEV (VIOTAPE_MAJOR , i |0x80 ),S_IFCHR |S_IRUSR |S_IWUSR ,"iseries/nvt%d" , i);sprintf (tapename,"iseries/vt%d" , i); - state[i].dev_handle =devfs_register_tape (tapename); printk(VIOTAPE_KERN_INFO "tape %s is iSeries " "resource %10.10s type %4.4s, model %3.3s\n", tapename, viotape_unitinfo[i].rsrcname,
@@ -979,7 +977,6 @@devfs_remove ("iseries/nvt%d" , i);devfs_remove ("iseries/vt%d" , i); -devfs_unregister_tape (state[i].dev_handle);class_device_destroy (tape_class,MKDEV (VIOTAPE_MAJOR , i |0x80 ));class_device_destroy (tape_class,MKDEV (VIOTAPE_MAJOR , i));return 0 ;
drivers/ide/ide-tape.c +1 -2
@@ -4707,7 +4707,6 @@ drive->driver_data =NULL ;devfs_remove ("%s/mt" , drive->devfs_name);devfs_remove ("%s/mtn" , drive->devfs_name); -devfs_unregister_tape (g->number); idetape_devs[tape->minor] =NULL ; g->private_data =NULL ;put_disk (g);
@@ -4886,7 +4885,7 @@S_IFCHR |S_IRUGO |S_IWUGO , "%s/mtn", drive->devfs_name); - g->number =devfs_register_tape (drive->devfs_name); + g->number =-1 ; g->fops = &idetape_block_ops;ide_register_region (g);
drivers/scsi/osst.c +1 -2
@@ -5815,7 +5815,7 @@S_IFCHR |S_IRUGO |S_IWUGO , "%s/ot%sn", SDp->devfs_name, osst_formats[mode]); } - drive->number =devfs_register_tape (SDp->devfs_name); + drive->number =-1 ; printk(KERN_INFO "osst :I: Attached OnStream %.5s tape at scsi%d, channel %d, id %d, lun %d as %s\n",
@@ -5847,7 +5847,6 @@devfs_remove ("%s/ot%s" , SDp->devfs_name, osst_formats[mode]);devfs_remove ("%s/ot%sn" , SDp->devfs_name, osst_formats[mode]); } -devfs_unregister_tape (tpnt->drive->number);put_disk (tpnt->drive); os_scsi_tapes[i] =NULL ; osst_nr_dev--;
PATCH 1/1 Remove devfs_mk_dir() function from the kernel tree
Removes the devfs_mk_dir() function and all callers of it.
--- arch/um/drivers/ubd_kern.c | 2 -- drivers/block/acsi_slm.c | 1 - drivers/block/floppy.c | 2 -- drivers/block/loop.c | 2 -- drivers/block/nbd.c | 1 - drivers/block/paride/pg.c | 1 - drivers/block/paride/pt.c | 1 - drivers/block/rd.c | 2 -- drivers/block/swim3.c | 2 -- drivers/block/sx8.c | 2 -- drivers/block/ub.c | 1 - drivers/cdrom/sbpcd.c | 2 -- drivers/char/ipmi/ipmi_devintf.c | 2 -- drivers/char/istallion.c | 1 - drivers/char/lp.c | 1 - drivers/char/ppdev.c | 1 - drivers/char/pty.c | 1 - drivers/char/stallion.c | 1 - drivers/char/tipar.c | 3 --- drivers/i2c/i2c-dev.c | 2 -- drivers/ide/ide.c | 1 - drivers/ieee1394/amdtp.c | 2 -- drivers/ieee1394/dv1394.c | 5 ----- drivers/ieee1394/ieee1394_core.c | 8 -------- drivers/ieee1394/video1394.c | 2 -- drivers/input/input.c | 9 --------- drivers/md/dm-ioctl.c | 1 - drivers/md/md.c | 1 - drivers/media/dvb/dvb-core/dvbdev.c | 3 --- drivers/mmc/mmc_block.c | 1 - drivers/mtd/mtd_blkdevs.c | 2 -- drivers/mtd/mtdchar.c | 1 - drivers/net/wan/cosa.c | 1 - drivers/s390/block/dasd.c | 3 --- drivers/s390/block/xpram.c | 2 -- drivers/sbus/char/bpp.c | 1 - drivers/sbus/char/vfc_dev.c | 1 - drivers/scsi/scsi.c | 1 - drivers/usb/core/file.c | 2 -- drivers/usb/input/hiddev.c | 1 - drivers/video/fbmem.c | 1 - fs/coda/psdev.c | 1 - include/linux/devfs_fs_kernel.h | 4 ---- mm/shmem.c | 4 +--- mm/tiny-shmem.c | 3 --- sound/core/sound.c | 1 - sound/sound_core.c | 1 - 47 files changed, 1 insertion(+), 93 deletions(-)
drivers/usb/core/file.c +0 -2
@@ -88,8 +88,6 @@ goto out; } -devfs_mk_dir ("usb" ); - out:return error; }
drivers/usb/input/hiddev.c +0 -1
@@ -833,7 +833,6 @@int __init hiddev_init (void ) { -devfs_mk_dir ("usb/hid" );return usb_register (&hiddev_driver); }
drivers/block/floppy.c +0 -2
@@ -4241,8 +4241,6 @@ motor_off_timer[dr].function = motor_off_callback; } -devfs_mk_dir ("floppy" ); - err =register_blkdev (FLOPPY_MAJOR ,"fd" );if (err) goto out_devfs_remove;
drivers/block/loop.c +0 -2
@@ -1270,8 +1270,6 @@ goto out_mem3; } -devfs_mk_dir ("loop" ); -for (i =0 ; i < max_loop; i++) {struct loop_device *lo = &loop_dev[i];struct gendisk *disk = disks[i];
drivers/block/nbd.c +0 -1
@@ -679,7 +679,6 @@printk (KERN_INFO "nbd: registered device at major %d\n" ,NBD_MAJOR );dprintk (DBG_INIT ,"nbd: debugflags=0x%x\n" , debugflags); -devfs_mk_dir ("nbd" );for (i =0 ; i < nbds_max; i++) {struct gendisk *disk = nbd_dev[i].disk; nbd_dev[i].file =NULL ;
drivers/block/sx8.c +0 -2
@@ -1667,8 +1667,6 @@if (host->flags &FL_DYN_MAJOR ) host->major = rc; -devfs_mk_dir (DRV_NAME ); - rc =carm_init_disks (host);if (rc) goto err_out_blkdev_disks;
drivers/block/ub.c +0 -1
@@ -2315,7 +2315,6 @@if ((rc =register_blkdev (UB_MAJOR ,DRV_NAME )) !=0 ) goto err_regblkdev; -devfs_mk_dir (DEVFS_NAME );if ((rc =usb_register (&ub_driver)) !=0 ) goto err_register;
drivers/block/acsi_slm.c +0 -1
@@ -1007,7 +1007,6 @@ BufferP = SLMBuffer; SLMState =IDLE ; -devfs_mk_dir ("slm" );for (i =0 ; i <MAX_SLM ; i++) {devfs_mk_cdev (MKDEV (ACSI_MAJOR , i),S_IFCHR |S_IRUSR |S_IWUSR ,"slm/%d" , i);
drivers/block/rd.c +0 -2
@@ -441,8 +441,6 @@ goto out; } -devfs_mk_dir ("rd" ); -for (i =0 ; i <CONFIG_BLK_DEV_RAM_COUNT ; i++) {struct gendisk *disk = rd_disks[i];
drivers/block/swim3.c +0 -2
@@ -1015,8 +1015,6 @@int err = -ENOMEM ;int i; -devfs_mk_dir ("floppy" ); - swim =find_devices ("floppy" );while (swim && (floppy_count <MAX_FLOPPIES )) {
drivers/char/ipmi/ipmi_devintf.c +0 -2
@@ -572,8 +572,6 @@ ipmi_major = rv; } -devfs_mk_dir (DEVICE_NAME ); - rv =ipmi_smi_watcher_register (&smi_watcher);if (rv) {unregister_chrdev (ipmi_major,DEVICE_NAME );
drivers/char/istallion.c +0 -1
@@ -5241,7 +5241,6 @@printk (KERN_ERR "STALLION: failed to register serial memory " "device\n" ); -devfs_mk_dir ("staliomem" ); istallion_class =class_create (THIS_MODULE ,"staliomem" );for (i =0 ; i <4 ; i++) { devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
drivers/char/lp.c +0 -1
@@ -906,7 +906,6 @@return -EIO ; } -devfs_mk_dir ("printers" ); lp_class =class_create (THIS_MODULE ,"printer" );if (IS_ERR (lp_class)) { err =PTR_ERR (lp_class);
drivers/char/ppdev.c +0 -1
@@ -781,7 +781,6 @@ err =PTR_ERR (ppdev_class); goto out_chrdev; } -devfs_mk_dir ("parports" );for (i =0 ; i <PARPORT_MAX ; i++) {devfs_mk_cdev (MKDEV (PP_MAJOR , i),S_IFCHR |S_IRUGO |S_IWUGO ,"parports/%d" , i);
drivers/char/pty.c +0 -1
@@ -352,7 +352,6 @@static void __init unix98_pty_init (void ) { -devfs_mk_dir ("pts" ); ptm_driver =alloc_tty_driver (NR_UNIX98_PTY_MAX );if (!ptm_driver)panic ("Couldn't allocate Unix98 ptm driver" );
drivers/char/stallion.c +0 -1
@@ -3088,7 +3088,6 @@*/ if (register_chrdev (STL_SIOMEMMAJOR ,"staliomem" , &stl_fsiomem))printk ("STALLION: failed to register serial board device\n" ); -devfs_mk_dir ("staliomem" ); stallion_class =class_create (THIS_MODULE ,"staliomem" );for (i =0 ; i <4 ; i++) {
drivers/char/tipar.c +0 -3
@@ -502,9 +502,6 @@ goto out; } -/* Use devfs with tree: /dev/ticables/par/[0..2] */ -devfs_mk_dir ("ticables/par" ); - tipar_class =class_create (THIS_MODULE ,"ticables" );if (IS_ERR (tipar_class)) { err =PTR_ERR (tipar_class);
drivers/ieee1394/dv1394.c +0 -5
@@ -2364,9 +2364,6 @@class_device_create (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_DV1394 *16 + (id<<2 )),NULL ,"dv1394-%d" , id); -devfs_mk_dir ("ieee1394/dv/host%d" , id); -devfs_mk_dir ("ieee1394/dv/host%d/NTSC" , id); -devfs_mk_dir ("ieee1394/dv/host%d/PAL" , id);dv1394_init (ohci,DV1394_NTSC ,MODE_RECEIVE );dv1394_init (ohci,DV1394_NTSC ,MODE_TRANSMIT );
@@ -2642,8 +2639,6 @@return ret; } -devfs_mk_dir ("ieee1394/dv" ); -hpsb_register_highlevel (&dv1394_highlevel); ret =hpsb_register_protocol (&dv1394_driver);
sound/core/sound.c +0 -1
@@ -340,7 +340,6 @@INIT_LIST_HEAD (&snd_minors_hash[card]);if ((err =snd_oss_init_module ()) <0 )return err; -devfs_mk_dir ("snd" );if (register_chrdev (major,"alsa" , &snd_fops)) {snd_printk (KERN_ERR "unable to register native major device number %d\n" , major);devfs_remove ("snd" );
sound/sound_core.c +0 -1
@@ -571,7 +571,6 @@printk (KERN_ERR "soundcore: sound device already in use.\n" );return -EBUSY ; } -devfs_mk_dir ("sound" ); sound_class =class_create (THIS_MODULE ,"sound" );if (IS_ERR (sound_class))return PTR_ERR (sound_class);
arch/um/drivers/ubd_kern.c +0 -2
@@ -816,7 +816,6 @@ {int i; -devfs_mk_dir ("ubd" );if (register_blkdev (MAJOR_NR ,"ubd" ))return -1 ;
@@ -830,7 +829,6 @@char name[sizeof ("ubd_nnn\0" )];snprintf (name,sizeof (name),"ubd_%d" , fake_major); -devfs_mk_dir (name);if (register_blkdev (fake_major,"ubd" ))return -1 ; }
drivers/block/paride/pg.c +0 -1
@@ -671,7 +671,6 @@ err =PTR_ERR (pg_class); goto out_chrdev; } -devfs_mk_dir ("pg" );for (unit =0 ; unit <PG_UNITS ; unit++) {struct pg *dev = &devices[unit];if (dev->present) {
drivers/block/paride/pt.c +0 -1
@@ -969,7 +969,6 @@ goto out_chrdev; } -devfs_mk_dir ("pt" );for (unit =0 ; unit <PT_UNITS ; unit++)if (pt[unit].present) { class_device_create(pt_class, MKDEV(major, unit),
drivers/cdrom/sbpcd.c +0 -2
@@ -5813,8 +5813,6 @@return -ENOMEM ; } -devfs_mk_dir ("sbp" ); -for (j=0 ;j<NR_SBPCD ;j++) {struct cdrom_device_info * sbpcd_infop;
drivers/input/input.c +0 -9
@@ -719,17 +719,8 @@remove_proc_entry ("handlers" , proc_bus_input_dir);remove_proc_entry ("input" , proc_bus);class_destroy (input_class); -return retval; } - retval =devfs_mk_dir ("input" ); -if (retval) { -remove_proc_entry ("devices" , proc_bus_input_dir); -remove_proc_entry ("handlers" , proc_bus_input_dir); -remove_proc_entry ("input" , proc_bus); -unregister_chrdev (INPUT_MAJOR ,"input" ); -class_destroy (input_class); - }return retval; }
drivers/md/md.c +0 -1
@@ -3631,7 +3631,6 @@unregister_blkdev (MAJOR_NR ,"md" );return -1 ; } -devfs_mk_dir ("md" );blk_register_region (MKDEV (MAJOR_NR ,0 ),MAX_MD_DEVS ,THIS_MODULE , md_probe,NULL ,NULL ); blk_register_region(MKDEV(mdp_major, 0), MAX_MD_DEVS<<MdpMinorShift, THIS_MODULE,
mm/shmem.c +1 -3
@@ -2219,9 +2219,7 @@printk (KERN_ERR "Could not register tmpfs\n" ); goto out2; } -#ifdef CONFIG_TMPFS -devfs_mk_dir ("shm" ); -#endif + shm_mnt =do_kern_mount (tmpfs_fs_type.name,MS_NOUSER , tmpfs_fs_type.name,NULL );if (IS_ERR (shm_mnt)) {
mm/tiny-shmem.c +0 -3
@@ -32,9 +32,6 @@static int __init init_tmpfs (void ) {register_filesystem (&tmpfs_fs_type); -#ifdef CONFIG_TMPFS -devfs_mk_dir ("shm" ); -#endif shm_mnt =kern_mount (&tmpfs_fs_type);return 0 ; }
drivers/i2c/i2c-dev.c +0 -2
@@ -521,8 +521,6 @@if (res) goto out_unreg_class; -devfs_mk_dir ("i2c" ); -return 0 ; out_unreg_class:
drivers/media/dvb/dvb-core/dvbdev.c +0 -3
@@ -302,7 +302,6 @@printk ("DVB: registering new adapter (%s).\n" , name); -devfs_mk_dir ("dvb/adapter%d" , num); adap->num = num; adap->name = name; adap->module = module;
@@ -409,8 +408,6 @@ goto error; } -devfs_mk_dir ("dvb" ); - dvb_class =class_create (THIS_MODULE ,"dvb" );if (IS_ERR (dvb_class)) { retval =PTR_ERR (dvb_class);
drivers/net/wan/cosa.c +0 -1
@@ -393,7 +393,6 @@ err = -ENODEV ; goto out; } -devfs_mk_dir ("cosa" ); cosa_class =class_create (THIS_MODULE ,"cosa" );if (IS_ERR (cosa_class)) { err =PTR_ERR (cosa_class);
drivers/s390/block/dasd.c +0 -3
@@ -1995,9 +1995,6 @@ dasd_diag_discipline_pointer =NULL ; - rc =devfs_mk_dir ("dasd" ); -if (rc) - goto failed; rc =dasd_devmap_init ();if (rc) goto failed;
drivers/s390/block/xpram.c +0 -2
@@ -443,8 +443,6 @@if (rc <0 ) goto out; -devfs_mk_dir ("slram" ); -/* * Assign the other needed values: make request function, sizes and * hardsect size. All the minor devices feature the same value.
drivers/scsi/scsi.c +0 -1
@@ -1335,7 +1335,6 @@for (i =0 ; i <NR_CPUS ; i++)INIT_LIST_HEAD (&per_cpu (scsi_done_q, i)); -devfs_mk_dir ("scsi" );open_softirq (SCSI_SOFTIRQ , scsi_softirq,NULL );register_scsi_cpu ();printk (KERN_NOTICE "SCSI subsystem initialized\n" );
drivers/video/fbmem.c +0 -1
@@ -1193,7 +1193,6 @@ {create_proc_read_entry ("fb" ,0 ,NULL , fbmem_read_proc,NULL ); -devfs_mk_dir ("fb" );if (register_chrdev (FB_MAJOR ,"fb" ,&fb_fops))printk ("unable to get major %d for fb devs\n" ,FB_MAJOR );
drivers/ide/ide.c +0 -1
@@ -1920,7 +1920,6 @@static int __init ide_init (void ) {printk (KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n" ); -devfs_mk_dir ("ide" ); system_bus_speed =ide_system_bus_speed ();bus_register (&ide_bus_type);
drivers/ieee1394/amdtp.c +0 -2
@@ -1277,8 +1277,6 @@return -EIO ; } -devfs_mk_dir ("amdtp" ); -hpsb_register_highlevel (&amdtp_highlevel);HPSB_INFO ("Loaded AMDTP driver" );
drivers/ieee1394/ieee1394_core.c +0 -8
@@ -1092,13 +1092,6 @@ goto exit_release_kernel_thread; } -/* actually this is a non-fatal error */ - ret =devfs_mk_dir ("ieee1394" ); -if (ret <0 ) { -HPSB_ERR ("unable to make devfs dir for device major %d!\n" ,IEEE1394_MAJOR ); - goto release_chrdev; - } - ret =bus_register (&ieee1394_bus_type);if (ret <0 ) {HPSB_INFO ("bus register failed" );
@@ -1168,7 +1161,6 @@bus_unregister (&ieee1394_bus_type); release_devfs:devfs_remove ("ieee1394" ); -release_chrdev:unregister_chrdev_region (IEEE1394_CORE_DEV ,256 ); exit_release_kernel_thread:if (khpsbpkt_pid >=0 ) {
drivers/ieee1394/video1394.c +0 -2
@@ -1551,8 +1551,6 @@return ret; } -devfs_mk_dir (VIDEO1394_DRIVER_NAME ); -hpsb_register_highlevel (&video1394_highlevel); ret =hpsb_register_protocol (&video1394_driver);
drivers/md/dm-ioctl.c +0 -1
@@ -66,7 +66,6 @@ {init_buckets (_name_buckets);init_buckets (_uuid_buckets); -devfs_mk_dir (DM_DIR );return 0 ; }
drivers/mmc/mmc_block.c +0 -1
@@ -488,7 +488,6 @@if (major ==0 ) major = res; -devfs_mk_dir ("mmc" );return mmc_register_driver (&mmc_driver); out:
drivers/mtd/mtd_blkdevs.c +0 -2
@@ -411,8 +411,6 @@return ret; } -devfs_mk_dir (tr->name); -INIT_LIST_HEAD (&tr->devs);list_add (&tr->list, &blktrans_majors);
drivers/mtd/mtdchar.c +0 -1
@@ -45,7 +45,6 @@static inline void mtdchar_devfs_init (void ) { -devfs_mk_dir ("mtd" );register_mtd_user (¬ifier); }
drivers/sbus/char/bpp.c +0 -1
@@ -1048,7 +1048,6 @@ instances[idx].opened =0 ;probeLptPort (idx); } -devfs_mk_dir ("bpp" );for (idx =0 ; idx <BPP_NO ; idx++) {devfs_mk_cdev (MKDEV (BPP_MAJOR , idx),S_IFCHR |S_IRUSR |S_IWUSR ,"bpp/%d" , idx);
drivers/sbus/char/vfc_dev.c +0 -1
@@ -678,7 +678,6 @@kfree (vfc_dev_lst);return -EIO ; } -devfs_mk_dir ("vfc" ); instance =0 ; for_all_sbusdev(sdev, sbus) {if (strcmp (sdev->prom_name,"vfc" ) ==0 ) {
fs/coda/psdev.c +0 -1
@@ -368,7 +368,6 @@ err =PTR_ERR (coda_psdev_class); goto out_chrdev; } -devfs_mk_dir ("coda" );for (i =0 ; i <MAX_CODADEVS ; i++) {class_device_create (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR ,i),NULL ,"cfs%d" , i);
include/linux/devfs_fs_kernel.h +0 -4
@@ -19,10 +19,6 @@ {return 0 ; } -static inline int devfs_mk_dir (const char *fmt, ...) -{ -return 0 ; -}static inline void devfs_remove (const char *fmt, ...) { }
PATCH 1/1 Remove devfs_mk_symlink() function from the kernel tree
Removes the devfs_mk_symlink() function and all callers of it.
--- arch/um/drivers/ubd_kern.c | 7 ------- include/linux/devfs_fs_kernel.h | 4 ---- 2 files changed, 11 deletions(-)
arch/um/drivers/ubd_kern.c +0 -7
@@ -619,7 +619,6 @@ {struct gendisk *disk; -char from[sizeof ("ubd/nnnnn\0" )], to[sizeof ("discnnnnn/disc\0" )];int err; disk =alloc_disk (1 <<UBD_SHIFT );
@@ -633,12 +632,6 @@if (major ==MAJOR_NR ){sprintf (disk->disk_name,"ubd%c" ,'a' + unit);sprintf (disk->devfs_name,"ubd/disc%d" , unit); -sprintf (from,"ubd/%d" , unit); -sprintf (to,"disc%d/disc" , unit); - err =devfs_mk_symlink (from, to); -if (err) -printk ("ubd_new_disk failed to make link from %s to " -"%s, error = %d\n" , from, to, err); }else {sprintf (disk->disk_name,"ubd_fake%d" , unit);
include/linux/devfs_fs_kernel.h +0 -4
@@ -15,10 +15,6 @@ {return 0 ; } -static inline int devfs_mk_symlink (const char *name,const char *link) -{ -return 0 ; -}static inline void devfs_remove (const char *fmt, ...) { }
PATCH 1/1 Remove devfs_mk_bdev() function from the kernel tree
Removes the devfs_mk_bdev() function and all callers of it.
--- drivers/block/floppy.c | 19 ------------------- drivers/md/dm-ioctl.c | 14 -------------- drivers/md/md.c | 13 ------------- fs/partitions/check.c | 4 ---- include/linux/devfs_fs_kernel.h | 4 ---- 5 files changed, 54 deletions(-)
drivers/block/floppy.c +0 -19
@@ -222,7 +222,6 @@static unsigned short virtual_dma_port =0x3f0 ;irqreturn_t floppy_interrupt (int irq,void *dev_id,struct pt_regs *regs);static int set_dor (int fdc,char mask,char data); -static void register_devfs_entries (int drive)__init ;#define K_64 0x10000/* 64KB */
@@ -3662,7 +3661,6 @@ first =0 ; }printk ("%s fd%d is %s" , prepend, drive, name); -register_devfs_entries (drive); } *UDP = *params; }
@@ -3955,23 +3953,6 @@static int *table_sup[] = {NULL , t360, t1200, t3in +5 +8 , t3in +5 , t3in, t3in }; -static void __init register_devfs_entries (int drive) -{ -int base_minor = (drive <4 ) ? drive : (124 + drive); - -if (UDP ->cmos <NUMBER (default_drive_params)) { -int i =0 ; -do { -int minor = base_minor + (table_sup[UDP ->cmos][i] <<2 ); - -devfs_mk_bdev (MKDEV (FLOPPY_MAJOR , minor), -S_IFBLK |S_IRUSR |S_IWUSR |S_IRGRP | -S_IWGRP ,"floppy/%d%s" , drive, - table[table_sup[UDP ->cmos][i]]); - }while (table_sup[UDP ->cmos][i++]); - } -} -/* * Floppy Driver initialization * =============================
drivers/md/dm-ioctl.c +0 -14
@@ -175,16 +175,6 @@/* * devfs stuff. */ -static int register_with_devfs (struct hash_cell *hc) -{ -struct gendisk *disk =dm_disk (hc->md); - -devfs_mk_bdev (MKDEV (disk->major, disk->first_minor), -S_IFBLK |S_IRUSR |S_IWUSR |S_IRGRP , -DM_DIR "/%s" , hc->name); -return 0 ; -} -static int unregister_with_devfs (struct hash_cell *hc) {devfs_remove (DM_DIR "/%s" , hc->name);
@@ -222,7 +212,6 @@ }list_add (&cell->uuid_list, _uuid_buckets +hash_str (uuid)); } -register_with_devfs (cell);dm_get (md);dm_set_mdptr (md, cell);up_write (&_hash_lock);
@@ -312,9 +301,6 @@ hc->name = new_name;list_add (&hc->name_list, _name_buckets +hash_str (new_name)); -/* rename the device node in devfs */ -register_with_devfs (hc); -up_write (&_hash_lock);kfree (old_name);return 0 ;
drivers/md/md.c +0 -13
@@ -3618,8 +3618,6 @@static int __init md_init (void ) { -int minor; - printk(KERN_INFO "md: md driver %d.%d.%d MAX_MD_DEVS=%d," " MD_SB_DISKS=%d\n", MD_MAJOR_VERSION, MD_MINOR_VERSION,
@@ -3636,17 +3634,6 @@blk_register_region (MKDEV (mdp_major,0 ),MAX_MD_DEVS <<MdpMinorShift,THIS_MODULE , md_probe,NULL ,NULL ); -for (minor=0 ; minor <MAX_MD_DEVS ; ++minor) -devfs_mk_bdev (MKDEV (MAJOR_NR , minor), -S_IFBLK |S_IRUSR |S_IWUSR , -"md/%d" , minor); - -for (minor=0 ; minor <MAX_MD_DEVS ; ++minor) -devfs_mk_bdev (MKDEV (mdp_major, minor<<MdpMinorShift), -S_IFBLK |S_IRUSR |S_IWUSR , -"md/mdp%d" , minor); - -register_reboot_notifier (&md_notifier); raid_table_header =register_sysctl_table (raid_root_table,1 );
fs/partitions/check.c +0 -4
@@ -291,10 +291,6 @@ p->nr_sects = len; p->partno = part; -devfs_mk_bdev (MKDEV (disk->major, disk->first_minor + part), -S_IFBLK |S_IRUSR |S_IWUSR , -"%s/part%d" , disk->devfs_name, part); -if (isdigit (disk->kobj.name[strlen (disk->kobj.name)-1 ]))snprintf (p->kobj.name,KOBJ_NAME_LEN ,"%sp%d" ,disk->kobj.name,part);else
include/linux/devfs_fs_kernel.h +0 -4
@@ -7,10 +7,6 @@#include <linux/types.h> #include <asm/semaphore.h> -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 ;
PATCH 1/1 Remove devfs_mk_cdev() function from the kernel tree
Removes the devfs_mk_cdev() function and all callers of it.
--- arch/sparc64/solaris/socksys.c | 2 - drivers/block/acsi_slm.c | 6 ---- drivers/block/paride/pg.c | 11 -------- drivers/block/paride/pt.c | 16 ----------- drivers/char/dsp56k.c | 8 ----- drivers/char/dtlk.c | 3 -- drivers/char/ftape/zftape/zftape-init.c | 18 ------------- drivers/char/ip2main.c | 17 ------------ drivers/char/ipmi/ipmi_devintf.c | 3 -- drivers/char/istallion.c | 6 ---- drivers/char/lp.c | 2 - drivers/char/mem.c | 7 +---- drivers/char/misc.c | 9 ------ drivers/char/ppdev.c | 4 -- drivers/char/raw.c | 8 ----- drivers/char/stallion.c | 6 ---- drivers/char/tipar.c | 10 ------- drivers/char/tty_io.c | 7 ----- drivers/char/vc_screen.c | 8 ----- drivers/char/viotape.c | 4 -- drivers/i2c/i2c-dev.c | 2 - drivers/ide/ide-tape.c | 7 ----- drivers/ieee1394/amdtp.c | 3 -- drivers/ieee1394/dv1394.c | 12 -------- drivers/ieee1394/raw1394.c | 4 -- drivers/ieee1394/video1394.c | 3 -- drivers/input/evdev.c | 2 - drivers/input/joydev.c | 2 - drivers/input/mousedev.c | 4 -- drivers/input/tsdev.c | 4 -- drivers/isdn/capi/capi.c | 2 - drivers/isdn/hardware/eicon/divamnt.c | 1 drivers/isdn/hardware/eicon/divasi.c | 1 drivers/isdn/hardware/eicon/divasmain.c | 1 drivers/macintosh/adb.c | 2 - drivers/media/dvb/dvb-core/dvbdev.c | 4 -- drivers/media/video/videodev.c | 6 +--- drivers/mtd/mtdchar.c | 44 -------------------------------- drivers/net/ppp_generic.c | 7 ----- drivers/net/wan/cosa.c | 7 ----- drivers/sbus/char/bpp.c | 4 -- drivers/sbus/char/vfc_dev.c | 4 -- drivers/scsi/osst.c | 13 --------- drivers/scsi/sg.c | 3 -- drivers/scsi/st.c | 13 --------- drivers/telephony/phonedev.c | 2 - drivers/usb/core/file.c | 1 drivers/video/fbmem.c | 2 - fs/coda/psdev.c | 11 -------- include/linux/devfs_fs_kernel.h | 4 -- sound/core/sound.c | 10 ------- sound/oss/soundcard.c | 10 ------- sound/sound_core.c | 2 - 53 files changed, 11 insertions(+), 341 deletions(-)
drivers/block/acsi_slm.c +0 -6
@@ -1,5 +1,3 @@ -/* -* acsi_slm.c -- Device driver for the Atari SLM laser printer * * Copyright 1995 Roman Hodek <[email protected]> *
@@ -1007,10 +1005,6 @@ BufferP = SLMBuffer; SLMState =IDLE ; -for (i =0 ; i <MAX_SLM ; i++) { -devfs_mk_cdev (MKDEV (ACSI_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR ,"slm/%d" , i); - }return 0 ; }
drivers/block/paride/pg.c +1 -10
@@ -673,22 +673,13 @@ }for (unit =0 ; unit <PG_UNITS ; unit++) {struct pg *dev = &devices[unit]; -if (dev->present) { +if (dev->present)class_device_create (pg_class,MKDEV (major, unit),NULL ,"pg%u" , unit); - err =devfs_mk_cdev (MKDEV (major, unit), -S_IFCHR |S_IRUSR |S_IWUSR ,"pg/%u" , - unit); -if (err) - goto out_class; - } } err =0 ; goto out; -out_class: -class_device_destroy (pg_class,MKDEV (major, unit)); -class_destroy (pg_class); out_chrdev:unregister_chrdev (major,"pg" ); out:
drivers/block/paride/pt.c +0 -16
@@ -973,27 +973,11 @@if (pt[unit].present) {class_device_create (pt_class,MKDEV (major, unit),NULL ,"pt%d" , unit); - err =devfs_mk_cdev (MKDEV (major, unit), -S_IFCHR |S_IRUSR |S_IWUSR , -"pt/%d" , unit); -if (err) { -class_device_destroy (pt_class,MKDEV (major, unit)); - goto out_class; - }class_device_create (pt_class,MKDEV (major, unit +128 ),NULL ,"pt%dn" , unit); - err =devfs_mk_cdev (MKDEV (major, unit +128 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"pt/%dn" , unit); -if (err) { -class_device_destroy (pt_class,MKDEV (major, unit +128 )); - goto out_class; - } } goto out; -out_class: -class_destroy (pt_class); out_chrdev:unregister_chrdev (major,"pt" ); out:
drivers/ide/ide-tape.c +0 -7
@@ -4878,13 +4878,6 @@idetape_setup (drive, tape, minor); -devfs_mk_cdev (MKDEV (HWIF (drive)->major, minor), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt" , drive->devfs_name); -devfs_mk_cdev (MKDEV (HWIF (drive)->major, minor +128 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mtn" , drive->devfs_name); - g->number =-1 ; g->fops = &idetape_block_ops;ide_register_region (g);
drivers/ieee1394/amdtp.c +0 -3
@@ -1238,9 +1238,6 @@INIT_LIST_HEAD (&ah->stream_list);spin_lock_init (&ah->stream_list_lock); - -devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , minor), -S_IFCHR |S_IRUSR |S_IWUSR ,"amdtp/%d" , ah->host->id); }static void amdtp_remove_host (struct hpsb_host *host)
drivers/ieee1394/dv1394.c +0 -12
@@ -2278,21 +2278,9 @@list_add_tail (&video->list, &dv1394_cards);spin_unlock_irqrestore (&dv1394_cards_lock, flags); -if (devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , -IEEE1394_MINOR_BLOCK_DV1394 *16 + video->id), -S_IFCHR |S_IRUGO |S_IWUGO , -"ieee1394/dv/host%d/%s/%s" , - (video->id>>2 ), - (video->pal_or_ntsc ==DV1394_NTSC ?"NTSC" :"PAL" ), - (video->mode ==MODE_RECEIVE ?"in" :"out" )) <0 ) - goto err_free; -debug_printk ("dv1394: dv1394_init() OK on ID %d\n" , video->id);return 0 ; - - err_free: -kfree (video); err:return -1 ; }
drivers/ieee1394/raw1394.c +0 -4
@@ -2907,10 +2907,6 @@ ret = -EFAULT ; goto out_unreg; } - -devfs_mk_cdev (MKDEV ( -IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_RAW1394 *16 ), -S_IFCHR |S_IRUSR |S_IWUSR ,RAW1394_DEVICE_NAME );cdev_init (&raw1394_cdev, &raw1394_fops); raw1394_cdev.owner =THIS_MODULE ;
drivers/ieee1394/video1394.c +0 -3
@@ -1373,9 +1373,6 @@class_device_create (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR , minor),NULL ,"%s-%d" ,VIDEO1394_DRIVER_NAME , ohci->host->id); -devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , minor), -S_IFCHR |S_IRUSR |S_IWUSR , -"%s/%d" ,VIDEO1394_DRIVER_NAME , ohci->host->id); }
drivers/input/evdev.c +0 -2
@@ -429,8 +429,6 @@ evdev_table[minor] = evdev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,EVDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/event%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,EVDEV_MINOR_BASE + minor), dev->dev,"event%d" , minor);
drivers/input/joydev.c +0 -2
@@ -450,8 +450,6 @@ joydev_table[minor] = joydev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,JOYDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/js%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,JOYDEV_MINOR_BASE + minor), dev->dev,"js%d" , minor);
drivers/input/mousedev.c +0 -4
@@ -645,8 +645,6 @@ mousedev_table[minor] = mousedev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/mouse%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE + minor), dev->dev,"mouse%d" , minor);
@@ -734,8 +732,6 @@ mousedev_mix.exist =1 ; mousedev_mix.minor =MOUSEDEV_MIX ; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE +MOUSEDEV_MIX ), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/mice" );class_device_create (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE +MOUSEDEV_MIX ),NULL ,"mice" );
drivers/input/tsdev.c +0 -4
@@ -410,10 +410,6 @@ tsdev_table[minor] = tsdev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/ts%d" , minor); -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor +TSDEV_MINORS /2 ), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/tsraw%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor), dev->dev,"ts%d" , minor);
drivers/macintosh/adb.c +0 -2
@@ -900,8 +900,6 @@return ; } -devfs_mk_cdev (MKDEV (ADB_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"adb" ); - adb_dev_class =class_create (THIS_MODULE ,"adb" );if (IS_ERR (adb_dev_class))return ;
drivers/sbus/char/bpp.c +0 -4
@@ -1048,10 +1048,6 @@ instances[idx].opened =0 ;probeLptPort (idx); } -for (idx =0 ; idx <BPP_NO ; idx++) { -devfs_mk_cdev (MKDEV (BPP_MAJOR , idx), -S_IFCHR |S_IRUSR |S_IWUSR ,"bpp/%d" , idx); - }return 0 ; }
drivers/sbus/char/vfc_dev.c +0 -4
@@ -165,10 +165,6 @@return -EINVAL ;if (init_vfc_hw (dev))return -EIO ; - -devfs_mk_cdev (MKDEV (VFC_MAJOR , instance), -S_IFCHR |S_IRUSR |S_IWUSR , -"vfc/%d" , instance);return 0 ; }
drivers/telephony/phonedev.c +0 -2
@@ -105,8 +105,6 @@if (phone_device[i] ==NULL ) { phone_device[i] = p; p->minor = i; -devfs_mk_cdev (MKDEV (PHONE_MAJOR ,i), -S_IFCHR |S_IRUSR |S_IWUSR ,"phone/%d" , i);up (&phone_lock);return 0 ; }
sound/core/sound.c +0 -10
@@ -39,7 +39,6 @@static int major =CONFIG_SND_MAJOR ;int snd_major;static int cards_limit =1 ; -static int device_mode =S_IFCHR |S_IRUGO |S_IWUGO ;MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>" );MODULE_DESCRIPTION ("Advanced Linux Sound Architecture driver for soundcards." );
@@ -48,10 +47,6 @@MODULE_PARM_DESC (major,"Major # for sound driver." );module_param (cards_limit, int,0444 );MODULE_PARM_DESC (cards_limit,"Count of auto-loadable soundcards." ); -#ifdef CONFIG_DEVFS_FS -module_param (device_mode, int,0444 ); -MODULE_PARM_DESC (device_mode,"Device file permission mask for devfs." ); -#endif MODULE_ALIAS_CHARDEV_MAJOR (CONFIG_SND_MAJOR );/* this one holds the actual max. card number currently available.
@@ -227,8 +222,6 @@return -EBUSY ; }list_add_tail (&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD (minor)]); -if (strncmp (name,"controlC" ,8 ) || card->number >= cards_limit) -devfs_mk_cdev (MKDEV (major, minor),S_IFCHR | device_mode,"snd/%s" , name);if (card) device = card->dev;class_device_create (sound_class,MKDEV (major, minor), device,"%s" , name);
@@ -330,7 +323,6 @@static int __init alsa_sound_init (void ) { -short controlnum;int err;int card;
@@ -353,8 +345,6 @@return -ENOMEM ; }snd_info_minor_register (); -for (controlnum =0 ; controlnum < cards_limit; controlnum++) -devfs_mk_cdev (MKDEV (major, controlnum<<5 ),S_IFCHR | device_mode,"snd/controlC%d" , controlnum);#ifndef MODULE printk (KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n" );#endif
sound/oss/soundcard.c +1 -9
@@ -564,9 +564,6 @@ sound_dmap_flag = (dmabuf >0 ?1 :0 );for (i =0 ; i <sizeof (dev_list) /sizeof *dev_list; i++) { -devfs_mk_cdev (MKDEV (SOUND_MAJOR , dev_list[i].minor), -S_IFCHR | dev_list[i].mode, -"sound/%s" , dev_list[i].name);class_device_create (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor),NULL ,"%s" , dev_list[i].name);
@@ -574,15 +571,10 @@if (!dev_list[i].num)continue ; -for (j =1 ; j < *dev_list[i].num; j++) { -devfs_mk_cdev (MKDEV (SOUND_MAJOR , - dev_list[i].minor + (j*0x10 )), -S_IFCHR | dev_list[i].mode, -"sound/%s%d" , dev_list[i].name, j); +for (j =1 ; j < *dev_list[i].num; j++)class_device_create (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor + (j*0x10 )),NULL ,"%s%d" , dev_list[i].name, j); - } }if (sound_nblocks >=1024 )
sound/sound_core.c +0 -2
@@ -172,8 +172,6 @@else sprintf (s->name,"sound/%s%d" , name, r /SOUND_STEP ); -devfs_mk_cdev (MKDEV (SOUND_MAJOR , s->unit_minor), -S_IFCHR | mode, s->name);class_device_create (sound_class,MKDEV (SOUND_MAJOR , s->unit_minor),NULL , s->name+6 );return r;
drivers/char/ftape/zftape/zftape-init.c +0 -18
@@ -332,29 +332,11 @@ zft_class =class_create (THIS_MODULE ,"zft" );for (i =0 ; i <4 ; i++) {class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i),NULL ,"qft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"qft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +4 ),NULL ,"nqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +4 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +16 ),NULL ,"zqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +16 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"zqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +20 ),NULL ,"nzqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +20 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nzqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +32 ),NULL ,"rawqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +32 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"rawqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +36 ),NULL ,"nrawrawqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +36 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nrawqft%i" , i); }#ifdef CONFIG_ZFT_COMPRESSOR
drivers/char/ip2main.c +0 -17
@@ -724,25 +724,8 @@if (NULL != ( pB = i2BoardPtrTable[i] ) ) {class_device_create (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i),NULL ,"ipl%d" , i); - err =devfs_mk_cdev (MKDEV (IP2_IPL_MAJOR ,4 * i), -S_IRUSR |S_IWUSR |S_IRGRP |S_IFCHR , -"ip2/ipl%d" , i); -if (err) { -class_device_destroy (ip2_class, -MKDEV (IP2_IPL_MAJOR ,4 * i)); - goto out_class; - } -class_device_create (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i +1 ),NULL ,"stat%d" , i); - err =devfs_mk_cdev (MKDEV (IP2_IPL_MAJOR ,4 * i +1 ), -S_IRUSR |S_IWUSR |S_IRGRP |S_IFCHR , -"ip2/stat%d" , i); -if (err) { -class_device_destroy (ip2_class, -MKDEV (IP2_IPL_MAJOR ,4 * i +1 )); - goto out_class; - }for ( box =0 ; box <ABS_MAX_BOXES ; ++box ) {
drivers/char/ipmi/ipmi_devintf.c +0 -3
@@ -526,9 +526,6 @@ {dev_t dev =MKDEV (ipmi_major, if_num); -devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR , -"ipmidev/%d" , if_num); -class_device_create (ipmi_class, dev,NULL ,"ipmi%d" , if_num); }
drivers/char/istallion.c +1 -5
@@ -5242,13 +5242,9 @@ "device\n"); istallion_class =class_create (THIS_MODULE ,"staliomem" ); -for (i =0 ; i <4 ; i++) { -devfs_mk_cdev (MKDEV (STL_SIOMEMMAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_create (istallion_class,MKDEV (STL_SIOMEMMAJOR , i),NULL ,"staliomem%d" , i); - }/* * Set up the tty driver structure and register us as a driver.
drivers/char/misc.c +1 -8
@@ -208,7 +208,7 @@ {struct miscdevice *c;dev_t dev; -int err; +int err =0 ;down (&misc_sem);list_for_each_entry (c, &misc_list, list) {
@@ -245,13 +245,6 @@ goto out; } - err =devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP , - misc->devfs_name); -if (err) { -class_device_destroy (misc_class, dev); - goto out; - } -/* * Add it to the front, so that later devices can "override" * earlier defaults
drivers/char/ppdev.c +0 -4
@@ -781,10 +781,6 @@ err =PTR_ERR (ppdev_class); goto out_chrdev; } -for (i =0 ; i <PARPORT_MAX ; i++) { -devfs_mk_cdev (MKDEV (PP_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO ,"parports/%d" , i); - }if (parport_register_driver (&pp_driver)) { printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); goto out_class;
drivers/char/raw.c +0 -8
@@ -287,7 +287,6 @@static int __init raw_init (void ) { -int i;dev_t dev =MKDEV (RAW_MAJOR ,0 );if (register_chrdev_region (dev,MAX_RAW_MINORS ,"raw" ))
@@ -309,13 +308,6 @@ }class_device_create (raw_class,MKDEV (RAW_MAJOR ,0 ),NULL ,"rawctl" ); -devfs_mk_cdev (MKDEV (RAW_MAJOR ,0 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"raw/rawctl" ); -for (i =1 ; i <MAX_RAW_MINORS ; i++) -devfs_mk_cdev (MKDEV (RAW_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO , -"raw/raw%d" , i);return 0 ; error:
drivers/char/stallion.c +1 -5
@@ -3090,12 +3090,8 @@printk ("STALLION: failed to register serial board device\n" ); stallion_class =class_create (THIS_MODULE ,"staliomem" ); -for (i =0 ; i <4 ; i++) { -devfs_mk_cdev (MKDEV (STL_SIOMEMMAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_create (stallion_class,MKDEV (STL_SIOMEMMAJOR , i),NULL ,"staliomem%d" , i); - } stl_serial->owner =THIS_MODULE ; stl_serial->driver_name = stl_drvname;
drivers/char/tipar.c +0 -10
@@ -438,12 +438,6 @@class_device_create (tipar_class,MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr),NULL ,"par%d" , nr); -/* Use devfs, tree: /dev/ticables/par/[0..2] */ - err =devfs_mk_cdev (MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr), -S_IFCHR |S_IRUGO |S_IWUGO , -"ticables/par/%d" , nr); -if (err) - goto out_class;/* Display informations */ pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
@@ -455,11 +449,7 @@pr_info ("tipar%d: link cable not found\n" , nr); err =0 ; - goto out; -out_class: -class_device_destroy (tipar_class,MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr)); -class_destroy (tipar_class); out:return err; }
drivers/char/viotape.c +0 -4
@@ -959,10 +959,6 @@ "iseries!vt%d", i);class_device_create (tape_class,MKDEV (VIOTAPE_MAJOR , i |0x80 ),NULL ,"iseries!nvt%d" , i); -devfs_mk_cdev (MKDEV (VIOTAPE_MAJOR , i),S_IFCHR |S_IRUSR |S_IWUSR , -"iseries/vt%d" , i); -devfs_mk_cdev (MKDEV (VIOTAPE_MAJOR , i |0x80 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"iseries/nvt%d" , i);sprintf (tapename,"iseries/vt%d" , i); printk(VIOTAPE_KERN_INFO "tape %s is iSeries " "resource %10.10s type %4.4s, model %3.3s\n",
drivers/char/dsp56k.c +0 -8
@@ -517,17 +517,9 @@ }class_device_create (dsp56k_class,MKDEV (DSP56K_MAJOR ,0 ),NULL ,"dsp56k" ); - err =devfs_mk_cdev (MKDEV (DSP56K_MAJOR ,0 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"dsp56k" ); -if (err) - goto out_class; -printk (banner); goto out; -out_class: -class_device_destroy (dsp56k_class,MKDEV (DSP56K_MAJOR ,0 )); -class_destroy (dsp56k_class); out_chrdev:unregister_chrdev (DSP56K_MAJOR ,"dsp56k" ); out:
drivers/char/dtlk.c +0 -3
@@ -337,9 +337,6 @@if (dtlk_dev_probe () ==0 )printk (", MAJOR %d\n" , dtlk_major); -devfs_mk_cdev (MKDEV (dtlk_major,DTLK_MINOR ), -S_IFCHR |S_IRUSR |S_IWUSR ,"dtlk" ); -init_timer (&dtlk_timer); dtlk_timer.function = dtlk_timer_tick;init_waitqueue_head (&dtlk_process_list);
drivers/char/mem.c +2 -5
@@ -866,13 +866,10 @@printk ("unable to get major %d for memory devs\n" ,MEM_MAJOR ); mem_class =class_create (THIS_MODULE ,"mem" ); -for (i =0 ; i <ARRAY_SIZE (devlist); i++) { +for (i =0 ; i <ARRAY_SIZE (devlist); i++)class_device_create (mem_class,MKDEV (MEM_MAJOR , devlist[i].minor),NULL , devlist[i].name); -devfs_mk_cdev (MKDEV (MEM_MAJOR , devlist[i].minor), -S_IFCHR | devlist[i].mode, devlist[i].name); - } - +return 0 ; }
drivers/char/tty_io.c +0 -7
@@ -2680,9 +2680,6 @@return ; } -devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR , -"%s%d" , driver->devfs_name, index + driver->name_base); -if (driver->type ==TTY_DRIVER_TYPE_PTY )pty_line_name (driver, index, name);else
@@ -2946,14 +2943,12 @@if (cdev_add (&tty_cdev,MKDEV (TTYAUX_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,0 ),1 ,"/dev/tty" ) <0 )panic ("Couldn't register /dev/tty driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,0 ),S_IFCHR |S_IRUGO |S_IWUGO ,"tty" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,0 ),NULL ,"tty" );cdev_init (&console_cdev, &console_fops);if (cdev_add (&console_cdev,MKDEV (TTYAUX_MAJOR ,1 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,1 ),1 ,"/dev/console" ) <0 )panic ("Couldn't register /dev/console driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,1 ),S_IFCHR |S_IRUSR |S_IWUSR ,"console" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,1 ),NULL ,"console" );#ifdef CONFIG_UNIX98_PTYS
@@ -2961,7 +2956,6 @@if (cdev_add (&ptmx_cdev,MKDEV (TTYAUX_MAJOR ,2 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,2 ),1 ,"/dev/ptmx" ) <0 )panic ("Couldn't register /dev/ptmx driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,2 ),S_IFCHR |S_IRUGO |S_IWUGO ,"ptmx" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,2 ),NULL ,"ptmx" );#endif
@@ -2970,7 +2964,6 @@if (cdev_add (&vc0_cdev,MKDEV (TTY_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTY_MAJOR ,0 ),1 ,"/dev/vc/0" ) <0 )panic ("Couldn't register /dev/tty0 driver\n" ); -devfs_mk_cdev (MKDEV (TTY_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vc/0" );class_device_create (tty_class,MKDEV (TTY_MAJOR ,0 ),NULL ,"tty0" );vty_init ();
drivers/char/vc_screen.c +0 -8
@@ -478,12 +478,6 @@void vcs_make_devfs (struct tty_struct *tty) { -devfs_mk_cdev (MKDEV (VCS_MAJOR , tty->index +1 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"vcc/%u" , tty->index +1 ); -devfs_mk_cdev (MKDEV (VCS_MAJOR , tty->index +129 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"vcc/a%u" , tty->index +1 );class_device_create (vc_class,MKDEV (VCS_MAJOR , tty->index +1 ),NULL ,"vcs%u" , tty->index +1 );class_device_create (vc_class,MKDEV (VCS_MAJOR , tty->index +129 ),NULL ,"vcsa%u" , tty->index +1 ); }
@@ -501,8 +495,6 @@panic ("unable to get major %d for vcs device" ,VCS_MAJOR ); vc_class =class_create (THIS_MODULE ,"vc" ); -devfs_mk_cdev (MKDEV (VCS_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vcc/0" ); -devfs_mk_cdev (MKDEV (VCS_MAJOR ,128 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vcc/a0" );class_device_create (vc_class,MKDEV (VCS_MAJOR ,0 ),NULL ,"vcs" );class_device_create (vc_class,MKDEV (VCS_MAJOR ,128 ),NULL ,"vcsa" );return 0 ;
drivers/isdn/capi/capi.c +0 -2
@@ -1506,8 +1506,6 @@ }class_device_create (capi_class,MKDEV (capi_major,0 ),NULL ,"capi" ); -devfs_mk_cdev (MKDEV (capi_major,0 ),S_IFCHR |S_IRUSR |S_IWUSR , -"isdn/capi20" );#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init () <0 ) {
drivers/isdn/hardware/eicon/divamnt.c +0 -1
@@ -190,7 +190,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }
drivers/isdn/hardware/eicon/divasi.c +0 -1
@@ -157,7 +157,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }
drivers/isdn/hardware/eicon/divasmain.c +0 -1
@@ -690,7 +690,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }
drivers/mtd/mtdchar.c +0 -44
61 lines not on this page · raw message
drivers/scsi/osst.c +1 -12
@@ -5668,7 +5668,7 @@struct st_partstat * STps;struct osst_buffer * buffer;struct gendisk * drive; -int i, mode, dev_num; +int i, dev_num;if (SDp->type !=TYPE_TAPE || !osst_supports (SDp))return -ENODEV ;
@@ -5804,17 +5804,6 @@snprintf (name,8 ,"%s%s" ,"n" ,tape_name (tpnt));osst_sysfs_add (MKDEV (OSST_MAJOR , dev_num +128 ), dev, tpnt, name); } -for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { -/* Rewind entry */ -devfs_mk_cdev (MKDEV (OSST_MAJOR , dev_num + (mode <<5 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/ot%s" , SDp->devfs_name, osst_formats[mode]); - -/* No-rewind entry */ -devfs_mk_cdev (MKDEV (OSST_MAJOR , dev_num + (mode <<5 ) +128 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/ot%sn" , SDp->devfs_name, osst_formats[mode]); - } drive->number =-1 ; printk(KERN_INFO
drivers/scsi/sg.c +0 -3
@@ -1539,9 +1539,6 @@ k = error; sdp = sg_dev_arr[k]; -devfs_mk_cdev (MKDEV (SCSI_GENERIC_MAJOR , k), -S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP , -"%s/generic" , scsidp->devfs_name); error =cdev_add (cdev,MKDEV (SCSI_GENERIC_MAJOR , k),1 );if (error) {devfs_remove ("%s/generic" , scsidp->devfs_name);
drivers/scsi/st.c +0 -13
@@ -3984,19 +3984,6 @@do_create_class_files (tpnt, dev_num, mode); } -for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { -/* Make sure that the minor numbers corresponding to the four -first modes always get the same names */ - i = mode << (4 -ST_NBR_MODE_BITS ); -/* Rewind entry */ -devfs_mk_cdev (MKDEV (SCSI_TAPE_MAJOR ,TAPE_MINOR (dev_num, mode,0 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt%s" , SDp->devfs_name, st_formats[i]); -/* No-rewind entry */ -devfs_mk_cdev (MKDEV (SCSI_TAPE_MAJOR ,TAPE_MINOR (dev_num, mode,1 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt%sn" , SDp->devfs_name, st_formats[i]); - } disk->number =-1 ; printk(KERN_WARNING
arch/sparc64/solaris/socksys.c +0 -2
@@ -190,8 +190,6 @@return ret; } -devfs_mk_cdev (MKDEV (30 ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"socksys" ); - file =fcheck (ret);/* N.B. Is this valid? Suppose the f_ops are in a module ... */ socksys_file_ops = *file->f_op;
drivers/char/lp.c +0 -2
@@ -806,8 +806,6 @@class_device_create (lp_class,MKDEV (LP_MAJOR , nr),NULL ,"lp%d" , nr); -devfs_mk_cdev (MKDEV (LP_MAJOR , nr),S_IFCHR |S_IRUGO |S_IWUGO , -"printers/%d" , nr);printk (KERN_INFO "lp%d: using %s (%s).\n" , nr, port->name, (port->irq ==PARPORT_IRQ_NONE )?"polling" :"interrupt-driven" );
drivers/i2c/i2c-dev.c +0 -2
@@ -432,8 +432,6 @@if (IS_ERR (i2c_dev))return PTR_ERR (i2c_dev); -devfs_mk_cdev (MKDEV (I2C_MAJOR , i2c_dev->minor), -S_IFCHR |S_IRUSR |S_IWUSR ,"i2c/%d" , i2c_dev->minor);dev_dbg (&adap->dev,"Registered as minor %d\n" , i2c_dev->minor);/* register this i2c device with the driver core */
drivers/media/dvb/dvb-core/dvbdev.c +0 -4
@@ -231,10 +231,6 @@list_add_tail (&dvbdev->list_head, &adap->device_list); -devfs_mk_cdev (MKDEV (DVB_MAJOR ,nums2minor (adap->num, type, id)), -S_IFCHR |S_IRUSR |S_IWUSR , -"dvb/adapter%d/%s%d" , adap->num, dnames[type], id); -class_device_create (dvb_class,MKDEV (DVB_MAJOR ,nums2minor (adap->num, type, id)),NULL ,"dvb%d.%s%d" , adap->num, dnames[type], id);
drivers/media/video/videodev.c +2 -4
@@ -329,9 +329,6 @@ vfd->minor=i;up (&videodev_lock); -sprintf (vfd->devfs_name,"v4l/%s%d" , name_base, i - base); -devfs_mk_cdev (MKDEV (VIDEO_MAJOR , vfd->minor), -S_IFCHR |S_IRUSR |S_IWUSR , vfd->devfs_name);init_MUTEX (&vfd->lock);/* sysfs class */
@@ -340,7 +337,8 @@ vfd->class_dev.dev = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.devt =MKDEV (VIDEO_MAJOR , vfd->minor); -strlcpy (vfd->class_dev.class_id, vfd->devfs_name +4 ,BUS_ID_SIZE ); +sprintf (vfd->devfs_name,"%s%d" , name_base, i - base); +strlcpy (vfd->class_dev.class_id, vfd->devfs_name,BUS_ID_SIZE );class_device_register (&vfd->class_dev);class_device_create_file (&vfd->class_dev, &class_device_attr_name);
drivers/net/ppp_generic.c +0 -7
@@ -864,10 +864,6 @@ goto out_chrdev; }class_device_create (ppp_class,MKDEV (PPP_MAJOR ,0 ),NULL ,"ppp" ); - err =devfs_mk_cdev (MKDEV (PPP_MAJOR ,0 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"ppp" ); -if (err) - goto out_class; } out:
@@ -875,9 +871,6 @@printk (KERN_ERR "failed to register PPP device (%d)\n" , err);return err; -out_class: -class_device_destroy (ppp_class,MKDEV (PPP_MAJOR ,0 )); -class_destroy (ppp_class); out_chrdev:unregister_chrdev (PPP_MAJOR ,"ppp" ); goto out;
drivers/net/wan/cosa.c +0 -7
@@ -401,13 +401,6 @@for (i=0 ; i<nr_cards; i++) {class_device_create (cosa_class,MKDEV (cosa_major, i),NULL ,"cosa%d" , i); - err =devfs_mk_cdev (MKDEV (cosa_major, i), -S_IFCHR |S_IRUSR |S_IWUSR , -"cosa/%d" , i); -if (err) { -class_device_destroy (cosa_class,MKDEV (cosa_major, i)); - goto out_chrdev; - } } err =0 ; goto out;
drivers/video/fbmem.c +0 -2
@@ -1099,8 +1099,6 @@ registered_fb[i] = fb_info; -devfs_mk_cdev (MKDEV (FB_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO ,"fb/%d" , i); event.info = fb_info;notifier_call_chain (&fb_notifier_list,FB_EVENT_FB_REGISTERED , &event);
drivers/usb/core/file.c +0 -1
@@ -162,7 +162,6 @@/* handle the devfs registration */ snprintf (name,BUS_ID_SIZE , class_driver->name, minor - minor_base); -devfs_mk_cdev (MKDEV (USB_MAJOR , minor), class_driver->mode, name);/* create a usb class device for this usb interface */ temp =strrchr (name,'/' );
fs/coda/psdev.c +1 -10
@@ -368,21 +368,12 @@ err =PTR_ERR (coda_psdev_class); goto out_chrdev; } -for (i =0 ; i <MAX_CODADEVS ; i++) { +for (i =0 ; i <MAX_CODADEVS ; i++)class_device_create (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR ,i),NULL ,"cfs%d" , i); - err =devfs_mk_cdev (MKDEV (CODA_PSDEV_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR ,"coda/%d" , i); -if (err) - goto out_class; - }coda_sysctl_init (); goto out; -out_class: -for (i =0 ; i <MAX_CODADEVS ; i++) -class_device_destroy (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR , i)); -class_destroy (coda_psdev_class); out_chrdev:unregister_chrdev (CODA_PSDEV_MAJOR ,"coda" ); out:
include/linux/devfs_fs_kernel.h +0 -4
@@ -7,10 +7,6 @@#include <linux/types.h> #include <asm/semaphore.h> -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, ...) { }
PATCH 1/1 Remove devfs_remove() function from the kernel tree
Removes the devfs_remove() function and all callers of it.
--- arch/sparc64/solaris/socksys.c | 1 drivers/block/acsi_slm.c | 4 --- drivers/block/cpqarray.c | 2 - drivers/block/floppy.c | 33 -------------------------------- drivers/block/loop.c | 2 - drivers/block/nbd.c | 1 drivers/block/paride/pg.c | 5 ---- drivers/block/paride/pt.c | 3 -- drivers/block/rd.c | 1 drivers/block/sx8.c | 1 drivers/block/ub.c | 2 - drivers/cdrom/sbpcd.c | 2 - drivers/char/dsp56k.c | 1 drivers/char/dtlk.c | 1 drivers/char/ftape/zftape/zftape-init.c | 6 ----- drivers/char/ip2main.c | 3 -- drivers/char/ipmi/ipmi_devintf.c | 2 - drivers/char/istallion.c | 5 ---- drivers/char/lp.c | 3 -- drivers/char/misc.c | 1 drivers/char/ppdev.c | 9 -------- drivers/char/raw.c | 6 ----- drivers/char/stallion.c | 5 ---- drivers/char/tipar.c | 2 - drivers/char/tty_io.c | 1 drivers/char/vc_screen.c | 2 - drivers/char/viotape.c | 2 - drivers/i2c/i2c-dev.c | 2 - drivers/ide/ide-probe.c | 4 --- drivers/ide/ide-tape.c | 2 - drivers/ide/ide.c | 5 ---- drivers/ieee1394/amdtp.c | 7 ------ drivers/ieee1394/dv1394.c | 6 ----- drivers/ieee1394/ieee1394_core.c | 8 ++----- drivers/ieee1394/raw1394.c | 2 - drivers/ieee1394/video1394.c | 8 +------ drivers/input/evdev.c | 1 drivers/input/input.c | 1 drivers/input/joydev.c | 1 drivers/input/mousedev.c | 2 - drivers/input/tsdev.c | 2 - drivers/isdn/capi/capi.c | 1 drivers/isdn/hardware/eicon/divamnt.c | 1 drivers/isdn/hardware/eicon/divasi.c | 1 drivers/isdn/hardware/eicon/divasmain.c | 1 drivers/md/dm-ioctl.c | 13 ------------ drivers/md/md.c | 6 ----- drivers/media/dvb/dvb-core/dvbdev.c | 6 ----- drivers/media/video/videodev.c | 1 drivers/mmc/mmc_block.c | 1 drivers/mtd/mtd_blkdevs.c | 1 drivers/net/ppp_generic.c | 1 drivers/net/wan/cosa.c | 5 ---- drivers/s390/block/dasd.c | 1 drivers/s390/block/xpram.c | 2 - drivers/sbus/char/bpp.c | 3 -- drivers/sbus/char/vfc_dev.c | 2 - drivers/scsi/osst.c | 8 ------- drivers/scsi/scsi.c | 1 drivers/scsi/sg.c | 5 ---- drivers/scsi/st.c | 2 - drivers/telephony/phonedev.c | 1 drivers/usb/core/file.c | 3 -- drivers/usb/input/hiddev.c | 1 drivers/video/fbmem.c | 1 fs/coda/psdev.c | 10 +-------- fs/partitions/check.c | 1 include/linux/devfs_fs_kernel.h | 3 -- sound/core/sound.c | 10 --------- sound/oss/soundcard.c | 5 ---- sound/sound_core.c | 2 - 71 files changed, 18 insertions(+), 238 deletions(-)
sound/core/sound.c +0 -10
@@ -254,8 +254,6 @@return -EINVAL ; } -if (strncmp (mptr->name,"controlC" ,8 ) || card->number >= cards_limit)/* created in sound.c */ -devfs_remove ("snd/%s" , mptr->name);class_device_destroy (sound_class,MKDEV (major, minor));list_del (&mptr->list);
@@ -334,14 +332,12 @@return err;if (register_chrdev (major,"alsa" , &snd_fops)) {snd_printk (KERN_ERR "unable to register native major device number %d\n" , major); -devfs_remove ("snd" );return -EIO ; }snd_memory_init ();if (snd_info_init () <0 ) {snd_memory_done ();unregister_chrdev (major,"alsa" ); -devfs_remove ("snd" );return -ENOMEM ; }snd_info_minor_register ();
@@ -353,17 +349,11 @@ static void __exit alsa_sound_exit(void) { -short controlnum; - -for (controlnum =0 ; controlnum < cards_limit; controlnum++) -devfs_remove ("snd/controlC%d" , controlnum); -snd_info_minor_unregister ();snd_info_done ();snd_memory_done ();if (unregister_chrdev (major,"alsa" ) !=0 )snd_printk (KERN_ERR "unable to unregister major device number %d\n" , major); -devfs_remove ("snd" ); }module_init (alsa_sound_init)
sound/oss/soundcard.c +1 -4
@@ -588,14 +588,11 @@int i, j;for (i =0 ; i <sizeof (dev_list) /sizeof *dev_list; i++) { -devfs_remove ("sound/%s" , dev_list[i].name);class_device_destroy (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor));if (!dev_list[i].num)continue ; -for (j =1 ; j < *dev_list[i].num; j++) { -devfs_remove ("sound/%s%d" , dev_list[i].name, j); +for (j =1 ; j < *dev_list[i].num; j++)class_device_destroy (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor + (j*0x10 ))); - } }unregister_sound_special (1 );
sound/sound_core.c +0 -2
@@ -195,7 +195,6 @@ p =__sound_remove_unit (list, unit);spin_unlock (&sound_loader_lock);if (p) { -devfs_remove (p->name);class_device_destroy (sound_class,MKDEV (SOUND_MAJOR , p->unit_minor));kfree (p); }
@@ -559,7 +558,6 @@/* We have nothing to really do here - we know the lists must be empty */ unregister_chrdev (SOUND_MAJOR ,"sound" ); -devfs_remove ("sound" );class_destroy (sound_class); }
drivers/ieee1394/amdtp.c +0 -7
@@ -1242,12 +1242,6 @@static void amdtp_remove_host (struct hpsb_host *host) { -struct amdtp_host *ah =hpsb_get_hostinfo (&amdtp_highlevel, host); - -if (ah) -devfs_remove ("amdtp/%d" , ah->host->id); - -return ; }static struct hpsb_highlevel amdtp_highlevel = {
@@ -1284,7 +1278,6 @@ static void __exit amdtp_exit_module (void) {hpsb_unregister_highlevel (&amdtp_highlevel); -devfs_remove ("amdtp" );cdev_del (&amdtp_cdev);HPSB_INFO ("Unloaded AMDTP driver" );
drivers/ieee1394/dv1394.c +0 -6
@@ -2296,7 +2296,6 @@ (video->mode ==MODE_RECEIVE ?"in" :"out" ) ); -devfs_remove ("ieee1394/%s" , buf);kfree (video); }
@@ -2333,9 +2332,6 @@class_device_destroy (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_DV1394 *16 + (id<<2 ))); -devfs_remove ("ieee1394/dv/host%d/NTSC" , id); -devfs_remove ("ieee1394/dv/host%d/PAL" , id); -devfs_remove ("ieee1394/dv/host%d" , id); }static void dv1394_add_host (struct hpsb_host *host)
@@ -2611,7 +2607,6 @@hpsb_unregister_highlevel (&dv1394_highlevel);cdev_del (&dv1394_cdev); -devfs_remove ("ieee1394/dv" ); }static int __init dv1394_init_module (void )
@@ -2633,7 +2628,6 @@if (ret) {printk (KERN_ERR "dv1394: failed to register protocol\n" );hpsb_unregister_highlevel (&dv1394_highlevel); -devfs_remove ("ieee1394/dv" );cdev_del (&dv1394_cdev);return ret; }
drivers/ieee1394/ieee1394_core.c +3 -5
@@ -1095,7 +1095,7 @@ ret =bus_register (&ieee1394_bus_type);if (ret <0 ) {HPSB_INFO ("bus register failed" ); - goto release_devfs; + goto release_chardev; }for (i =0 ; fw_bus_attrs[i]; i++) {
@@ -1106,7 +1106,7 @@ fw_bus_attrs[i--]); }bus_unregister (&ieee1394_bus_type); - goto release_devfs; + goto release_chardev; } }
@@ -1159,8 +1159,7 @@for (i =0 ; fw_bus_attrs[i]; i++)bus_remove_file (&ieee1394_bus_type, fw_bus_attrs[i]);bus_unregister (&ieee1394_bus_type); -release_devfs: -devfs_remove ("ieee1394" ); +release_chardev:unregister_chrdev_region (IEEE1394_CORE_DEV ,256 ); exit_release_kernel_thread:if (khpsbpkt_pid >=0 ) {
@@ -1197,7 +1196,6 @@hpsb_cleanup_config_roms ();unregister_chrdev_region (IEEE1394_CORE_DEV ,256 ); -devfs_remove ("ieee1394" ); }module_init (ieee1394_init);
drivers/ieee1394/raw1394.c +0 -2
@@ -2929,7 +2929,6 @@ goto out; out_dev: -devfs_remove (RAW1394_DEVICE_NAME );class_device_destroy (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_RAW1394 *16 )); out_unreg:
@@ -2943,7 +2942,6 @@class_device_destroy (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_RAW1394 *16 ));cdev_del (&raw1394_cdev); -devfs_remove (RAW1394_DEVICE_NAME );hpsb_unregister_highlevel (&raw1394_highlevel);hpsb_unregister_protocol (&raw1394_driver); }
drivers/ieee1394/video1394.c +2 -6
@@ -1380,12 +1380,10 @@ {struct ti_ohci *ohci =hpsb_get_hostinfo (&video1394_highlevel, host); -if (ohci) { +if (ohci)class_device_destroy (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_VIDEO1394 *16 + ohci->host->id)); -devfs_remove ("%s/%d" ,VIDEO1394_DRIVER_NAME , ohci->host->id); - } - +return ; }
@@ -1529,7 +1527,6 @@hpsb_unregister_highlevel (&video1394_highlevel); -devfs_remove (VIDEO1394_DRIVER_NAME );cdev_del (&video1394_cdev);PRINT_G (KERN_INFO ,"Removed " VIDEO1394_DRIVER_NAME " module" );
@@ -1554,7 +1551,6 @@if (ret) {PRINT_G (KERN_ERR ,"video1394: failed to register protocol" );hpsb_unregister_highlevel (&video1394_highlevel); -devfs_remove (VIDEO1394_DRIVER_NAME );cdev_del (&video1394_cdev);return ret; }
drivers/cdrom/sbpcd.c +0 -2
@@ -5909,7 +5909,6 @@if (D_S [j].drv_id==-1 )continue ;del_gendisk (D_S [j].disk);put_disk (D_S [j].disk); -devfs_remove ("sbp/c0t%d" , j);vfree (D_S [j].sbp_buf);if (D_S [j].sbp_audsiz>0 )vfree (D_S [j].aud_buf);if ((unregister_cdrom (D_S [j].sbpcd_infop) == -EINVAL ))
@@ -5919,7 +5918,6 @@ }vfree (D_S [j].sbpcd_infop); } -devfs_remove ("sbp" );msg (DBG_INF ,"%s module released.\n" , major_name); }
drivers/input/evdev.c +0 -1
@@ -443,7 +443,6 @@class_device_destroy (input_class,MKDEV (INPUT_MAJOR ,EVDEV_MINOR_BASE + evdev->minor)); -devfs_remove ("input/event%d" , evdev->minor); evdev->exist =0 ;if (evdev->open) {
drivers/input/input.c +0 -1
@@ -730,7 +730,6 @@remove_proc_entry ("handlers" , proc_bus_input_dir);remove_proc_entry ("input" , proc_bus); -devfs_remove ("input" );unregister_chrdev (INPUT_MAJOR ,"input" );class_destroy (input_class); }
drivers/input/joydev.c +0 -1
@@ -463,7 +463,6 @@struct joydev_list *list;class_device_destroy (input_class,MKDEV (INPUT_MAJOR ,JOYDEV_MINOR_BASE + joydev->minor)); -devfs_remove ("input/js%d" , joydev->minor); joydev->exist =0 ;if (joydev->open) {
drivers/input/mousedev.c +0 -2
@@ -659,7 +659,6 @@class_device_destroy (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE + mousedev->minor)); -devfs_remove ("input/mouse%d" , mousedev->minor); mousedev->exist =0 ;if (mousedev->open) {
@@ -751,7 +750,6 @@if (psaux_registered)misc_deregister (&psaux_mouse);#endif -devfs_remove ("input/mice" );class_device_destroy (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE +MOUSEDEV_MIX ));input_unregister_handler (&mousedev_handler);
drivers/input/tsdev.c +0 -2
@@ -424,8 +424,6 @@class_device_destroy (input_class,MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + tsdev->minor)); -devfs_remove ("input/ts%d" , tsdev->minor); -devfs_remove ("input/tsraw%d" , tsdev->minor); tsdev->exist =0 ;if (tsdev->open) {
drivers/md/dm-ioctl.c +0 -13
@@ -72,7 +72,6 @@static void dm_hash_exit (void ) {dm_hash_remove_all (); -devfs_remove (DM_DIR ); }/*-----------------------------------------------------------------
@@ -173,15 +172,6 @@ }/* -* devfs stuff. -*/ -static int unregister_with_devfs (struct hash_cell *hc) -{ -devfs_remove (DM_DIR "/%s" , hc->name); -return 0 ; -} - -/* * The kdev_t and uuid of a device can never change once it is * initially inserted. */
@@ -229,7 +219,6 @@/* remove from the dev hash */ list_del (&hc->uuid_list);list_del (&hc->name_list); -unregister_with_devfs (hc);dm_set_mdptr (hc->md,NULL );dm_put (hc->md);if (hc->new_map)
@@ -294,8 +283,6 @@/* * rename and move the name cell. */ -unregister_with_devfs (hc); -list_del (&hc->name_list); old_name = hc->name; hc->name = new_name;
drivers/md/md.c +0 -6
@@ -3692,12 +3692,6 @@int i;blk_unregister_region (MKDEV (MAJOR_NR ,0 ),MAX_MD_DEVS );blk_unregister_region (MKDEV (mdp_major,0 ),MAX_MD_DEVS << MdpMinorShift); -for (i=0 ; i <MAX_MD_DEVS ; i++) -devfs_remove ("md/%d" , i); -for (i=0 ; i <MAX_MD_DEVS ; i++) -devfs_remove ("md/d%d" , i); - -devfs_remove ("md" );unregister_blkdev (MAJOR_NR ,"md" );unregister_blkdev (mdp_major,"mdp" );
fs/coda/psdev.c +2 -8
@@ -414,12 +414,9 @@ }return 0 ; out: -for (i =0 ; i <MAX_CODADEVS ; i++) { +for (i =0 ; i <MAX_CODADEVS ; i++)class_device_destroy (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR , i)); -devfs_remove ("coda/%d" , i); - }class_destroy (coda_psdev_class); -devfs_remove ("coda" );unregister_chrdev (CODA_PSDEV_MAJOR ,"coda" );coda_sysctl_clean (); out1:
@@ -436,12 +433,9 @@if ( err !=0 ) {printk ("coda: failed to unregister filesystem\n" ); } -for (i =0 ; i <MAX_CODADEVS ; i++) { +for (i =0 ; i <MAX_CODADEVS ; i++)class_device_destroy (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR , i)); -devfs_remove ("coda/%d" , i); - }class_destroy (coda_psdev_class); -devfs_remove ("coda" );unregister_chrdev (CODA_PSDEV_MAJOR ,"coda" );coda_sysctl_clean ();coda_destroy_inodecache ();
fs/partitions/check.c +0 -1
@@ -274,7 +274,6 @@ p->start_sect =0 ; p->nr_sects =0 ; p->reads = p->writes = p->read_sectors = p->write_sectors =0 ; -devfs_remove ("%s/part%d" , disk->devfs_name, part);kobject_unregister (&p->kobj); }
drivers/block/acsi_slm.c +0 -4
@@ -1027,10 +1027,6 @@void cleanup_module (void ) { -int i; -for (i =0 ; i <MAX_SLM ; i++) -devfs_remove ("slm/%d" , i); -devfs_remove ("slm" );if (unregister_chrdev (ACSI_MAJOR ,"slm" ) !=0 )printk (KERN_ERR "acsi_slm: cleanup_module failed\n" );atari_stram_free ( SLMBuffer );
drivers/block/cpqarray.c +0 -2
@@ -346,7 +346,6 @@for (j =0 ; j <NWD ; j++) {if (ida_gendisk[i][j]->flags &GENHD_FL_UP )del_gendisk (ida_gendisk[i][j]); -devfs_remove ("ida/c%dd%d" ,i,j);put_disk (ida_gendisk[i][j]); }blk_cleanup_queue (hba[i]->queue);
@@ -1842,7 +1841,6 @@ } } -devfs_remove ("ida" );remove_proc_entry ("cpqarray" , proc_root_driver); }
drivers/block/floppy.c +1 -32
@@ -3938,20 +3938,6 @@ .media_changed = check_floppy_change, .revalidate_disk = floppy_revalidate, }; -static char *table[] = { -"" ,"d360" ,"h1200" ,"u360" ,"u720" ,"h360" ,"h720" , -"u1440" ,"u2880" ,"CompaQ" ,"h1440" ,"u1680" ,"h410" , -"u820" ,"h1476" ,"u1722" ,"h420" ,"u830" ,"h1494" ,"u1743" , -"h880" ,"u1040" ,"u1120" ,"h1600" ,"u1760" ,"u1920" , -"u3200" ,"u3520" ,"u3840" ,"u1840" ,"u800" ,"u1600" , -NULL -}; -static int t360[] = {1 ,0 }, - t1200[] = {2 ,5 ,6 ,10 ,12 ,14 ,16 ,18 ,20 ,23 ,0 }, - t3in[] = {8 ,9 ,26 ,27 ,28 ,7 ,11 ,15 ,19 ,24 ,25 ,29 ,31 ,3 ,4 ,13 , -17 ,21 ,22 ,30 ,0 }; -static int *table_sup[] = - {NULL , t360, t1200, t3in +5 +8 , t3in +5 , t3in, t3in };/* * Floppy Driver initialization
@@ -4224,7 +4210,7 @@ err =register_blkdev (FLOPPY_MAJOR ,"fd" );if (err) - goto out_devfs_remove; + goto out_put_disk; floppy_queue =blk_init_queue (do_fd_request, &floppy_lock);if (!floppy_queue) {
@@ -4377,8 +4363,6 @@blk_cleanup_queue (floppy_queue); out_unreg_blkdev:unregister_blkdev (FLOPPY_MAJOR ,"fd" ); -out_devfs_remove: -devfs_remove ("floppy" ); out_put_disk:while (dr--) {del_timer (&motor_off_timer[dr]);
@@ -4532,19 +4516,6 @@static char *floppy; -static void unregister_devfs_entries (int drive) -{ -int i; - -if (UDP ->cmos <NUMBER (default_drive_params)) { - i =0 ; -do { -devfs_remove ("floppy/%d%s" , drive, - table[table_sup[UDP ->cmos][i]]); - }while (table_sup[UDP ->cmos][i++]); - } -} -static void __init parse_floppy_cfg_string (char *cfg) {char *ptr;
@@ -4581,12 +4552,10 @@if ((allowed_drive_mask & (1 << drive)) && fdc_state[FDC (drive)].version !=FDC_NONE ) {del_gendisk (disks[drive]); -unregister_devfs_entries (drive); }put_disk (disks[drive]); }platform_device_unregister (&floppy_device); -devfs_remove ("floppy" );del_timer_sync (&fd_timeout);del_timer_sync (&fd_timer);
drivers/isdn/capi/capi.c +0 -1
@@ -1540,7 +1540,6 @@class_device_destroy (capi_class,MKDEV (capi_major,0 ));class_destroy (capi_class);unregister_chrdev (capi_major,"capi20" ); -devfs_remove ("isdn/capi20" );#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE capinc_tty_exit ();
drivers/isdn/hardware/eicon/divamnt.c +0 -1
@@ -178,7 +178,6 @@static void divas_maint_unregister_chrdev (void ) { -devfs_remove (DEVNAME );unregister_chrdev (major,DEVNAME ); }
drivers/isdn/hardware/eicon/divasi.c +0 -1
@@ -145,7 +145,6 @@static void divas_idi_unregister_chrdev (void ) { -devfs_remove (DEVNAME );unregister_chrdev (major,DEVNAME ); }
drivers/isdn/hardware/eicon/divasmain.c +0 -1
@@ -678,7 +678,6 @@static void divas_unregister_chrdev (void ) { -devfs_remove (DEVNAME );unregister_chrdev (major,DEVNAME ); }
drivers/mtd/mtd_blkdevs.c +0 -1
@@ -443,7 +443,6 @@ tr->remove_dev (dev); } -devfs_remove (tr->name);blk_cleanup_queue (tr->blkcore_priv->rq);unregister_blkdev (tr->major, tr->name);
drivers/scsi/osst.c +1 -7
@@ -107,8 +107,6 @@ };#endif -static char *osst_formats[ST_NBR_MODES ] ={"" ,"l" ,"m" ,"a" }; -/* Some default definitions have been moved to osst_options.h */ #define OSST_BUFFER_SIZE (OSST_BUFFER_BLOCKS * ST_KILOBYTE)#define OSST_WRITE_THRESHOLD (OSST_WRITE_THRESHOLD_BLOCKS * ST_KILOBYTE)
@@ -5821,7 +5819,7 @@ {struct scsi_device * SDp =to_scsi_device (dev);struct osst_tape * tpnt; -int i, mode; +int i;if ((SDp->type !=TYPE_TAPE ) || (osst_nr_dev <=0 ))return 0 ;
@@ -5832,10 +5830,6 @@osst_sysfs_destroy (MKDEV (OSST_MAJOR , i));osst_sysfs_destroy (MKDEV (OSST_MAJOR , i+128 )); tpnt->device =NULL ; -for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { -devfs_remove ("%s/ot%s" , SDp->devfs_name, osst_formats[mode]); -devfs_remove ("%s/ot%sn" , SDp->devfs_name, osst_formats[mode]); - }put_disk (tpnt->drive); os_scsi_tapes[i] =NULL ; osst_nr_dev--;
drivers/scsi/scsi.c +0 -1
@@ -1361,7 +1361,6 @@scsi_exit_sysctl ();scsi_exit_hosts ();scsi_exit_devinfo (); -devfs_remove ("scsi" );scsi_exit_procfs ();scsi_exit_queue ();unregister_scsi_cpu ();
drivers/scsi/sg.c +1 -4
@@ -1540,10 +1540,8 @@ sdp = sg_dev_arr[k]; error =cdev_add (cdev,MKDEV (SCSI_GENERIC_MAJOR , k),1 ); -if (error) { -devfs_remove ("%s/generic" , scsidp->devfs_name); +if (error) goto out; - } sdp->cdev = cdev;if (sg_sysfs_valid) {struct class_device * sg_class_member;
@@ -1636,7 +1634,6 @@class_device_destroy (sg_sysfs_class,MKDEV (SCSI_GENERIC_MAJOR , k));cdev_del (sdp->cdev); sdp->cdev =NULL ; -devfs_remove ("%s/generic" , scsidp->devfs_name);put_disk (sdp->disk); sdp->disk =NULL ;if (NULL == sdp->headfp)
drivers/scsi/st.c +0 -2
@@ -4045,8 +4045,6 @@ "tape");for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { j = mode << (4 -ST_NBR_MODE_BITS ); -devfs_remove ("%s/mt%s" , SDp->devfs_name, st_formats[j]); -devfs_remove ("%s/mt%sn" , SDp->devfs_name, st_formats[j]);for (j=0 ; j <2 ; j++) { class_device_destroy(st_sysfs_class, MKDEV(SCSI_TAPE_MAJOR,
drivers/block/loop.c +0 -2
@@ -1301,7 +1301,6 @@ out_mem4:while (i--)blk_put_queue (loop_dev[i].lo_queue); -devfs_remove ("loop" ); i = max_loop; out_mem3:while (i--)
@@ -1324,7 +1323,6 @@blk_put_queue (loop_dev[i].lo_queue);put_disk (disks[i]); } -devfs_remove ("loop" );if (unregister_blkdev (LOOP_MAJOR ,"loop" ))printk (KERN_WARNING "loop: cannot unregister blkdev\n" );
drivers/block/nbd.c +0 -1
@@ -721,7 +721,6 @@put_disk (disk); } } -devfs_remove ("nbd" );unregister_blkdev (NBD_MAJOR ,"nbd" );printk (KERN_INFO "nbd: unregistered device at major %d\n" ,NBD_MAJOR ); }
drivers/block/rd.c +0 -1
@@ -411,7 +411,6 @@put_disk (rd_disks[i]);blk_cleanup_queue (rd_queue[i]); } -devfs_remove ("rd" );unregister_blkdev (RAMDISK_MAJOR ,"ramdisk" ); }
drivers/block/sx8.c +0 -1
@@ -1731,7 +1731,6 @@free_irq (pdev->irq, host);carm_free_disks (host); -devfs_remove (DRV_NAME );unregister_blkdev (host->major, host->name);if (host->major ==160 )clear_bit (0 , &carm_major_alloc);
drivers/block/ub.c +0 -2
@@ -2322,7 +2322,6 @@return 0 ; err_register: -devfs_remove (DEVFS_NAME );unregister_blkdev (UB_MAJOR ,DRV_NAME ); err_regblkdev:return rc;
@@ -2332,7 +2331,6 @@ {usb_deregister (&ub_driver); -devfs_remove (DEVFS_NAME );unregister_blkdev (UB_MAJOR ,DRV_NAME ); }
drivers/char/ftape/zftape/zftape-init.c +0 -6
@@ -362,17 +362,11 @@TRACE (ft_t_info,"successful" ); }for (i =0 ; i <4 ; i++) { -devfs_remove ("qft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i)); -devfs_remove ("nqft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +4 )); -devfs_remove ("zqft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +16 )); -devfs_remove ("nzqft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +20 )); -devfs_remove ("rawqft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +32 )); -devfs_remove ("nrawqft%i" , i);class_device_destroy (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +36 )); }class_destroy (zft_class);
drivers/char/ipmi/ipmi_devintf.c +0 -2
@@ -532,7 +532,6 @@static void ipmi_smi_gone (int if_num) {class_device_destroy (ipmi_class,MKDEV (ipmi_major, if_num)); -devfs_remove ("ipmidev/%d" , if_num); } static struct ipmi_smi_watcher smi_watcher =
@@ -585,7 +584,6 @@ {class_destroy (ipmi_class);ipmi_smi_watcher_unregister (&smi_watcher); -devfs_remove (DEVICE_NAME );unregister_chrdev (ipmi_major,DEVICE_NAME ); }module_exit (cleanup_ipmi);
drivers/usb/core/file.c +0 -3
@@ -95,7 +95,6 @@void usb_major_cleanup (void ) {class_destroy (usb_class); -devfs_remove ("usb" );unregister_chrdev (USB_MAJOR ,"usb" ); }
@@ -174,7 +173,6 @@spin_lock (&minor_lock); usb_minors[intf->minor] =NULL ;spin_unlock (&minor_lock); -devfs_remove (name); retval =PTR_ERR (intf->class_dev); } exit:
@@ -217,7 +215,6 @@spin_unlock (&minor_lock);snprintf (name,BUS_ID_SIZE , class_driver->name, intf->minor - minor_base); -devfs_remove (name);class_device_destroy (usb_class,MKDEV (USB_MAJOR , intf->minor)); intf->class_dev =NULL ; intf->minor =-1 ;
drivers/usb/input/hiddev.c +0 -1
@@ -839,5 +839,4 @@void hiddev_exit (void ) {usb_deregister (&hiddev_driver); -devfs_remove ("usb/hid" ); }
arch/sparc64/solaris/socksys.c +0 -1
@@ -205,5 +205,4 @@ {if (unregister_chrdev (30 ,"socksys" ))printk ("Couldn't unregister socksys character device\n" ); -devfs_remove ("socksys" ); }
drivers/block/paride/pg.c +1 -4
@@ -692,13 +692,10 @@for (unit =0 ; unit <PG_UNITS ; unit++) {struct pg *dev = &devices[unit]; -if (dev->present) { +if (dev->present)class_device_destroy (pg_class,MKDEV (major, unit)); -devfs_remove ("pg/%u" , unit); - } }class_destroy (pg_class); -devfs_remove ("pg" );unregister_chrdev (major, name);for (unit =0 ; unit <PG_UNITS ; unit++) {
drivers/block/paride/pt.c +0 -3
@@ -990,12 +990,9 @@for (unit =0 ; unit <PT_UNITS ; unit++)if (pt[unit].present) {class_device_destroy (pt_class,MKDEV (major, unit)); -devfs_remove ("pt/%d" , unit);class_device_destroy (pt_class,MKDEV (major, unit +128 )); -devfs_remove ("pt/%dn" , unit); }class_destroy (pt_class); -devfs_remove ("pt" );unregister_chrdev (major, name);for (unit =0 ; unit <PT_UNITS ; unit++)if (pt[unit].present)
drivers/ide/ide-probe.c +1 -3
@@ -1308,10 +1308,8 @@ide_drive_t *drive =container_of (dev, ide_drive_t, gendev);spin_lock_irq (&ide_lock); -if (drive->devfs_name[0 ] !='\0' ) { -devfs_remove (drive->devfs_name); +if (drive->devfs_name[0 ] !='\0' ) drive->devfs_name[0 ] ='\0' ; - }ide_remove_drive_from_hwgroup (drive);if (drive->id !=NULL ) {kfree (drive->id);
drivers/ide/ide-tape.c +0 -2
@@ -4705,8 +4705,6 @@ drive->dsc_overlap =0 ; drive->driver_data =NULL ; -devfs_remove ("%s/mt" , drive->devfs_name); -devfs_remove ("%s/mtn" , drive->devfs_name); idetape_devs[tape->minor] =NULL ; g->private_data =NULL ;put_disk (g);
drivers/ide/ide.c +1 -4
@@ -594,10 +594,8 @@for (unit =0 ; unit <MAX_DRIVES ; ++unit) { drive = &hwif->drives[unit];if (!drive->present) { -if (drive->devfs_name[0 ] !='\0' ) { -devfs_remove (drive->devfs_name); +if (drive->devfs_name[0 ] !='\0' ) drive->devfs_name[0 ] ='\0' ; - }continue ; }spin_unlock_irq (&ide_lock);
@@ -1997,7 +1995,6 @@#ifdef CONFIG_PROC_FS proc_ide_destroy ();#endif -devfs_remove ("ide" );bus_unregister (&ide_bus_type); }
drivers/mmc/mmc_block.c +0 -1
@@ -497,7 +497,6 @@ static void __exit mmc_blk_exit(void) {mmc_unregister_driver (&mmc_driver); -devfs_remove ("mmc" );unregister_blkdev (major,"mmc" ); }
drivers/sbus/char/bpp.c +0 -3
@@ -1056,9 +1056,6 @@ {unsigned idx; -for (idx =0 ; idx <BPP_NO ; idx++) -devfs_remove ("bpp/%d" , idx); -devfs_remove ("bpp" );unregister_chrdev (BPP_MAJOR , dev_name);for (idx =0 ; idx <BPP_NO ; idx++) {
drivers/sbus/char/vfc_dev.c +0 -2
@@ -713,7 +713,6 @@ {if (dev ==NULL )return ; -devfs_remove ("vfc/%d" , dev->instance);sbus_iounmap ((unsigned long )dev->regs,sizeof (struct vfc_regs ));kfree (dev); }
@@ -727,7 +726,6 @@for (devp = vfc_dev_lst; *devp; devp++)deinit_vfc_device (*devp); -devfs_remove ("vfc" );kfree (vfc_dev_lst);return ; }
drivers/telephony/phonedev.c +0 -1
@@ -122,7 +122,6 @@down (&phone_lock);if (phone_device[pfd->minor] != pfd)panic ("phone: bad unregister" ); -devfs_remove ("phone/%d" , pfd->minor); phone_device[pfd->minor] =NULL ;up (&phone_lock); }
drivers/char/dsp56k.c +0 -1
@@ -532,7 +532,6 @@class_device_destroy (dsp56k_class,MKDEV (DSP56K_MAJOR ,0 ));class_destroy (dsp56k_class);unregister_chrdev (DSP56K_MAJOR ,"dsp56k" ); -devfs_remove ("dsp56k" ); }module_exit (dsp56k_cleanup_driver);
drivers/char/dtlk.c +0 -1
@@ -354,7 +354,6 @@dtlk_write_tts (DTLK_CLEAR );unregister_chrdev (dtlk_major,"dtlk" ); -devfs_remove ("dtlk" );release_region (dtlk_port_lpc,DTLK_IO_EXTENT ); }
drivers/char/istallion.c +1 -4
@@ -852,11 +852,8 @@return ; }put_tty_driver (stli_serial); -for (i =0 ; i <4 ; i++) { -devfs_remove ("staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_destroy (istallion_class,MKDEV (STL_SIOMEMMAJOR , i)); - } -devfs_remove ("staliomem" );class_destroy (istallion_class);if ((i =unregister_chrdev (STL_SIOMEMMAJOR ,"staliomem" ))) printk("STALLION: failed to un-register serial memory device, "
drivers/char/lp.c +0 -3
@@ -929,7 +929,6 @@ out_class:class_destroy (lp_class); out_devfs: -devfs_remove ("printers" );unregister_chrdev (LP_MAJOR ,"lp" );return err; }
@@ -977,10 +976,8 @@if (lp_table[offset].dev ==NULL )continue ;parport_unregister_device (lp_table[offset].dev); -devfs_remove ("printers/%d" , offset);class_device_destroy (lp_class,MKDEV (LP_MAJOR , offset)); } -devfs_remove ("printers" );class_destroy (lp_class); }
drivers/char/raw.c +0 -6
@@ -317,12 +317,6 @@ static void __exit raw_exit(void) { -int i; - -for (i =1 ; i <MAX_RAW_MINORS ; i++) -devfs_remove ("raw/raw%d" , i); -devfs_remove ("raw/rawctl" ); -devfs_remove ("raw" );class_device_destroy (raw_class,MKDEV (RAW_MAJOR ,0 ));class_destroy (raw_class);cdev_del (&raw_cdev);
drivers/char/tipar.c +0 -2
@@ -527,10 +527,8 @@continue ;parport_unregister_device (table[i].dev);class_device_destroy (tipar_class,MKDEV (TIPAR_MAJOR , i)); -devfs_remove ("ticables/par/%d" , i); }class_destroy (tipar_class); -devfs_remove ("ticables/par" );pr_info ("tipar: module unloaded\n" ); }
drivers/char/tty_io.c +0 -1
@@ -2697,7 +2697,6 @@*/ void tty_unregister_device (struct tty_driver *driver,unsigned index) { -devfs_remove ("%s%d" , driver->devfs_name, index + driver->name_base);class_device_destroy (tty_class,MKDEV (driver->major, driver->minor_start) + index); }
drivers/char/vc_screen.c +0 -2
@@ -483,8 +483,6 @@ }void vcs_remove_devfs (struct tty_struct *tty) { -devfs_remove ("vcc/%u" , tty->index +1 ); -devfs_remove ("vcc/a%u" , tty->index +1 );class_device_destroy (vc_class,MKDEV (VCS_MAJOR , tty->index +1 ));class_device_destroy (vc_class,MKDEV (VCS_MAJOR , tty->index +129 )); }
drivers/i2c/i2c-dev.c +0 -2
@@ -463,7 +463,6 @@return -ENODEV ;init_completion (&i2c_dev->released); -devfs_remove ("i2c/%d" , i2c_dev->minor);return_i2c_dev (i2c_dev);class_device_unregister (&i2c_dev->class_dev);wait_for_completion (&i2c_dev->released);
@@ -534,7 +533,6 @@ {i2c_del_driver (&i2cdev_driver);class_unregister (&i2c_dev_class); -devfs_remove ("i2c" );unregister_chrdev (I2C_MAJOR ,"i2c" ); }
drivers/media/dvb/dvb-core/dvbdev.c +0 -6
@@ -248,9 +248,6 @@if (!dvbdev)return ; -devfs_remove ("dvb/adapter%d/%s%d" , dvbdev->adapter->num, - dnames[dvbdev->type], dvbdev->id); -class_device_destroy (dvb_class,MKDEV (DVB_MAJOR ,nums2minor (dvbdev->adapter->num, dvbdev->type, dvbdev->id)));
@@ -313,8 +310,6 @@int dvb_unregister_adapter (struct dvb_adapter *adap) { -devfs_remove ("dvb/adapter%d" , adap->num); -if (down_interruptible (&dvbdev_register_lock))return -ERESTARTSYS ;list_del (&adap->list_head);
@@ -420,7 +415,6 @@ static void __exit exit_dvbdev(void) { -devfs_remove ("dvb" );class_destroy (dvb_class);cdev_del (&dvb_device_cdev);unregister_chrdev_region (MKDEV (DVB_MAJOR ,0 ),MAX_DVB_MINORS );
drivers/media/video/videodev.c +0 -1
@@ -366,7 +366,6 @@if (video_device[vfd->minor]!=vfd)panic ("videodev: bad unregister" ); -devfs_remove (vfd->devfs_name); video_device[vfd->minor]=NULL ;class_device_unregister (&vfd->class_dev);up (&videodev_lock);
drivers/net/ppp_generic.c +0 -1
@@ -2603,7 +2603,6 @@cardmap_destroy (&all_ppp_units);if (unregister_chrdev (PPP_MAJOR ,"ppp" ) !=0 )printk (KERN_ERR "PPP: failed to unregister PPP device\n" ); -devfs_remove ("ppp" );class_device_destroy (ppp_class,MKDEV (PPP_MAJOR ,0 ));class_destroy (ppp_class); }
drivers/net/wan/cosa.c +1 -4
@@ -418,12 +418,9 @@int i;printk (KERN_INFO "Unloading the cosa module\n" ); -for (i=0 ; i<nr_cards; i++) { +for (i=0 ; i<nr_cards; i++)class_device_destroy (cosa_class,MKDEV (cosa_major, i)); -devfs_remove ("cosa/%d" , i); - }class_destroy (cosa_class); -devfs_remove ("cosa" );for (cosa=cosa_cards; nr_cards--; cosa++) {/* Clean up the per-channel data */ for (i=0 ; i<cosa->nchannels; i++) {
drivers/s390/block/dasd.c +0 -1
@@ -1742,7 +1742,6 @@dasd_ioctl_exit ();dasd_gendisk_exit ();dasd_devmap_exit (); -devfs_remove ("dasd" );if (dasd_debug_area !=NULL ) {debug_unregister (dasd_debug_area); dasd_debug_area =NULL ;
drivers/s390/block/xpram.c +0 -2
@@ -478,7 +478,6 @@return 0 ; out_unreg: -devfs_remove ("slram" );unregister_blkdev (XPRAM_MAJOR ,XPRAM_NAME ); out:while (i--)
@@ -497,7 +496,6 @@put_disk (xpram_disks[i]); }unregister_blkdev (XPRAM_MAJOR ,XPRAM_NAME ); -devfs_remove ("slram" );blk_cleanup_queue (xpram_queue);sysdev_unregister (&xpram_sys_device);sysdev_class_unregister (&xpram_sysclass);
drivers/video/fbmem.c +0 -1
@@ -1124,7 +1124,6 @@ i = fb_info->node;if (!registered_fb[i])return -EINVAL ; -devfs_remove ("fb/%d" , i);if (fb_info->pixmap.addr && (fb_info->pixmap.flags &FB_PIXMAP_DEFAULT ))kfree (fb_info->pixmap.addr);
drivers/char/ip2main.c +0 -3
@@ -415,9 +415,7 @@/* free io addresses and Tibet */ release_region ( ip2config.addr[i],8 );class_device_destroy (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i)); -devfs_remove ("ip2/ipl%d" , i);class_device_destroy (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i +1 )); -devfs_remove ("ip2/stat%d" , i); }/* Disable and remove interrupt handler. */ if ( (ip2config.irq[i] >0 ) &&have_requested_irq (ip2config.irq[i]) ) {
@@ -426,7 +424,6 @@ } }class_destroy (ip2_class); -devfs_remove ("ip2" );if ( ( err =tty_unregister_driver ( ip2_tty_driver ) ) ) {printk (KERN_ERR "IP2: failed to unregister tty driver (%d)\n" , err); }
drivers/char/misc.c +0 -1
@@ -275,7 +275,6 @@down (&misc_sem);list_del (&misc->list);class_device_destroy (misc_class,MKDEV (MISC_MAJOR , misc->minor)); -devfs_remove (misc->devfs_name);if (i <DYNAMIC_MINORS && i>0 ) { misc_minors[i>>3 ] &= ~(1 << (misc->minor &7 )); }
drivers/char/ppdev.c +1 -8
@@ -769,7 +769,7 @@static int __init ppdev_init (void ) { -int i, err =0 ; +int err =0 ;if (register_chrdev (PP_MAJOR ,CHRDEV , &pp_fops)) { printk (KERN_WARNING CHRDEV ": unable to get major %d\n",
@@ -790,9 +790,6 @@ goto out; out_class: -for (i =0 ; i <PARPORT_MAX ; i++) -devfs_remove ("parports/%d" , i); -devfs_remove ("parports" );class_destroy (ppdev_class); out_chrdev:unregister_chrdev (PP_MAJOR ,CHRDEV );
@@ -802,12 +799,8 @@ static void __exit ppdev_cleanup (void) { -int i;/* Clean up all parport stuff */ -for (i =0 ; i <PARPORT_MAX ; i++) -devfs_remove ("parports/%d" , i);parport_unregister_driver (&pp_driver); -devfs_remove ("parports" );class_destroy (ppdev_class);unregister_chrdev (PP_MAJOR ,CHRDEV ); }
drivers/char/stallion.c +1 -4
@@ -775,11 +775,8 @@restore_flags (flags);return ; } -for (i =0 ; i <4 ; i++) { -devfs_remove ("staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_destroy (stallion_class,MKDEV (STL_SIOMEMMAJOR , i)); - } -devfs_remove ("staliomem" );if ((i =unregister_chrdev (STL_SIOMEMMAJOR ,"staliomem" )))printk ("STALLION: failed to un-register serial memory device, " "errno=%d\n" , -i);
drivers/char/viotape.c +0 -2
@@ -971,8 +971,6 @@ {int i = vdev->unit_address; -devfs_remove ("iseries/nvt%d" , i); -devfs_remove ("iseries/vt%d" , i);class_device_destroy (tape_class,MKDEV (VIOTAPE_MAJOR , i |0x80 ));class_device_destroy (tape_class,MKDEV (VIOTAPE_MAJOR , i));return 0 ;
include/linux/devfs_fs_kernel.h +0 -3
@@ -7,7 +7,4 @@#include <linux/types.h> #include <asm/semaphore.h> -static inline void devfs_remove (const char *fmt, ...) -{ -}#endif /* _LINUX_DEVFS_FS_KERNEL_H */
PATCH 1/1 Remove the devfs_fs_kernel.h file from the tree
Also fixes up all files that #include it.
--- arch/sparc64/solaris/socksys.c | 1 - arch/um/drivers/line.c | 1 - arch/um/drivers/mmapper_kern.c | 1 - arch/um/drivers/ubd_kern.c | 1 - drivers/block/acsi_slm.c | 1 - drivers/block/cpqarray.c | 1 - drivers/block/floppy.c | 1 - drivers/block/loop.c | 1 - drivers/block/nbd.c | 2 -- drivers/block/paride/pg.c | 1 - drivers/block/paride/pt.c | 1 - drivers/block/rd.c | 1 - drivers/block/swim3.c | 1 - drivers/block/sx8.c | 1 - drivers/block/ub.c | 1 - drivers/cdrom/cdu31a.c | 1 - drivers/cdrom/cm206.c | 1 - drivers/cdrom/mcdx.c | 1 - drivers/cdrom/sbpcd.c | 1 - drivers/char/dsp56k.c | 1 - drivers/char/dtlk.c | 1 - drivers/char/ftape/zftape/zftape-init.c | 1 - drivers/char/ip2main.c | 1 - drivers/char/ipmi/ipmi_devintf.c | 1 - drivers/char/istallion.c | 1 - drivers/char/lp.c | 1 - drivers/char/mem.c | 1 - drivers/char/misc.c | 1 - drivers/char/mmtimer.c | 1 - drivers/char/ppdev.c | 1 - drivers/char/pty.c | 1 - drivers/char/raw.c | 1 - drivers/char/stallion.c | 1 - drivers/char/tipar.c | 1 - drivers/char/tty_io.c | 1 - drivers/char/vc_screen.c | 1 - drivers/char/viotape.c | 1 - drivers/char/vt.c | 1 - drivers/i2c/i2c-dev.c | 1 - drivers/ide/ide-probe.c | 1 - drivers/ide/ide-tape.c | 1 - drivers/ide/ide.c | 1 - drivers/ieee1394/ieee1394_core.h | 1 - drivers/ieee1394/raw1394.c | 1 - drivers/ieee1394/video1394.c | 1 - drivers/input/evdev.c | 1 - drivers/input/input.c | 1 - drivers/input/joydev.c | 1 - drivers/input/mousedev.c | 1 - drivers/input/serio/serio_raw.c | 1 - drivers/input/tsdev.c | 1 - drivers/isdn/capi/capi.c | 1 - drivers/isdn/hardware/eicon/divamnt.c | 1 - drivers/isdn/hardware/eicon/divasi.c | 1 - drivers/isdn/hardware/eicon/divasmain.c | 1 - drivers/macintosh/adb.c | 1 - drivers/md/dm-ioctl.c | 1 - drivers/md/md.c | 1 - drivers/media/dvb/dvb-core/dvbdev.h | 1 - drivers/media/dvb/ttpci/av7110.h | 4 ---- drivers/media/video/arv.c | 1 - drivers/media/video/videodev.c | 1 - drivers/mmc/mmc_block.c | 1 - drivers/mtd/mtd_blkdevs.c | 1 - drivers/net/ppp_generic.c | 1 - drivers/net/wan/cosa.c | 1 - drivers/s390/block/dasd_int.h | 1 - drivers/s390/block/xpram.c | 1 - drivers/s390/net/ctctty.c | 1 - drivers/sbus/char/bpp.c | 1 - drivers/sbus/char/vfc.h | 2 -- drivers/scsi/osst.c | 1 - drivers/scsi/scsi.c | 1 - drivers/scsi/sg.c | 1 - drivers/scsi/st.c | 1 - drivers/telephony/phonedev.c | 1 - drivers/usb/core/file.c | 1 - drivers/usb/input/hiddev.c | 1 - drivers/video/fbmem.c | 1 - fs/block_dev.c | 1 - fs/char_dev.c | 1 - fs/coda/psdev.c | 1 - fs/partitions/check.c | 1 - include/asm-ppc/ocp.h | 1 - include/linux/devfs_fs_kernel.h | 10 ---------- include/linux/fb.h | 1 - init/do_mounts.h | 1 - init/main.c | 1 - mm/shmem.c | 1 - mm/tiny-shmem.c | 1 - net/irda/irnet/irnet.h | 1 - sound/core/info.c | 1 - sound/core/sound.c | 1 - sound/oss/soundcard.c | 1 - sound/sound_core.c | 1 - 95 files changed, 109 deletions(-)
include/asm-ppc/ocp.h +0 -1
@@ -27,7 +27,6 @@#include <linux/init.h> #include <linux/list.h> #include <linux/config.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #include <asm/mmu.h>
include/linux/fb.h +0 -1
@@ -363,7 +363,6 @@#include <linux/tty.h> #include <linux/device.h> #include <linux/workqueue.h> -#include <linux/devfs_fs_kernel.h> #include <linux/notifier.h> #include <linux/list.h> #include <asm/io.h>
init/do_mounts.h +0 -1
@@ -1,6 +1,5 @@#include <linux/config.h> #include <linux/kernel.h> -#include <linux/devfs_fs_kernel.h> #include <linux/init.h> #include <linux/syscalls.h> #include <linux/unistd.h>
net/irda/irnet/irnet.h +0 -1
@@ -244,7 +244,6 @@#include <linux/skbuff.h> #include <linux/tty.h> #include <linux/proc_fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/netdevice.h> #include <linux/miscdevice.h> #include <linux/poll.h>
init/main.c +0 -1
@@ -15,7 +15,6 @@#include <linux/types.h> #include <linux/module.h> #include <linux/proc_fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/kernel.h> #include <linux/syscalls.h> #include <linux/string.h>
mm/shmem.c +0 -1
@@ -26,7 +26,6 @@#include <linux/config.h> #include <linux/module.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/fs.h> #include <linux/mm.h> #include <linux/mman.h>
mm/tiny-shmem.c +0 -1
@@ -12,7 +12,6 @@#include <linux/fs.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/vfs.h> #include <linux/mount.h> #include <linux/file.h>
sound/core/info.c +0 -1
@@ -29,7 +29,6 @@#include <sound/info.h> #include <sound/version.h> #include <linux/proc_fs.h> -#include <linux/devfs_fs_kernel.h> #include <stdarg.h> /*
sound/core/sound.c +0 -1
@@ -31,7 +31,6 @@#include <sound/control.h> #include <sound/initval.h> #include <linux/kmod.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #define SNDRV_OS_MINORS 256
sound/oss/soundcard.c +0 -1
@@ -38,7 +38,6 @@#include <linux/wait.h> #include <linux/slab.h> #include <linux/ioport.h> -#include <linux/devfs_fs_kernel.h> #include <linux/major.h> #include <linux/delay.h> #include <linux/proc_fs.h>
sound/sound_core.c +0 -1
@@ -44,7 +44,6 @@#include <linux/sound.h> #include <linux/major.h> #include <linux/kmod.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #define SOUND_STEP 16
arch/sparc64/solaris/socksys.c +0 -1
@@ -26,7 +26,6 @@#include <linux/slab.h> #include <linux/syscalls.h> #include <linux/in.h> -#include <linux/devfs_fs_kernel.h> #include <net/sock.h>
arch/um/drivers/line.c +0 -1
@@ -8,7 +8,6 @@#include "linux/list.h" #include "linux/kd.h" #include "linux/interrupt.h" -#include "linux/devfs_fs_kernel.h" #include "asm/uaccess.h" #include "chan_kern.h" #include "irq_user.h"
arch/um/drivers/mmapper_kern.c +0 -1
@@ -12,7 +12,6 @@#include <linux/types.h> #include <linux/kdev_t.h> #include <linux/time.h> -#include <linux/devfs_fs_kernel.h> #include <linux/module.h> #include <linux/mm.h> #include <linux/slab.h>
arch/um/drivers/ubd_kern.c +0 -1
@@ -25,7 +25,6 @@#include "linux/blkdev.h" #include "linux/hdreg.h" #include "linux/init.h" -#include "linux/devfs_fs_kernel.h" #include "linux/cdrom.h" #include "linux/proc_fs.h" #include "linux/ctype.h"
drivers/video/fbmem.c +0 -1
@@ -31,7 +31,6 @@#ifdef CONFIG_KMOD #include <linux/kmod.h> #endif -#include <linux/devfs_fs_kernel.h> #include <linux/err.h> #include <linux/kernel.h> #include <linux/device.h>
fs/block_dev.c +0 -1
@@ -12,7 +12,6 @@#include <linux/slab.h> #include <linux/kmod.h> #include <linux/major.h> -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #include <linux/highmem.h> #include <linux/blkdev.h>
fs/char_dev.c +0 -1
@@ -14,7 +14,6 @@#include <linux/errno.h> #include <linux/module.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/kobject.h> #include <linux/kobj_map.h>
fs/coda/psdev.c +0 -1
@@ -28,7 +28,6 @@#include <linux/delay.h> #include <linux/skbuff.h> #include <linux/proc_fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/vmalloc.h> #include <linux/fs.h> #include <linux/file.h>
fs/partitions/check.c +0 -1
@@ -18,7 +18,6 @@#include <linux/fs.h> #include <linux/kmod.h> #include <linux/ctype.h> -#include <linux/devfs_fs_kernel.h> #include "check.h"
drivers/block/acsi_slm.c +0 -1
@@ -63,7 +63,6 @@#include <linux/time.h> #include <linux/mm.h> #include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #include <asm/pgtable.h>
drivers/block/cpqarray.c +0 -1
@@ -33,7 +33,6 @@#include <linux/blkpg.h> #include <linux/timer.h> #include <linux/proc_fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/init.h> #include <linux/hdreg.h> #include <linux/spinlock.h>
drivers/block/floppy.c +0 -1
@@ -176,7 +176,6 @@#include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #include <linux/buffer_head.h> /* for invalidate_buffers() */
drivers/block/loop.c +0 -1
@@ -63,7 +63,6 @@#include <linux/blkdev.h> #include <linux/blkpg.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #include <linux/swap.h> #include <linux/slab.h>
drivers/block/nbd.c +0 -2
@@ -56,8 +56,6 @@#include <linux/ioctl.h> #include <net/sock.h> -#include <linux/devfs_fs_kernel.h> -#include <asm/uaccess.h> #include <asm/types.h>
drivers/block/paride/pg.c +0 -1
@@ -156,7 +156,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/delay.h> #include <linux/slab.h> #include <linux/mtio.h>
drivers/block/paride/pt.c +0 -1
@@ -141,7 +141,6 @@#include <linux/module.h> #include <linux/init.h> #include <linux/fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/delay.h> #include <linux/slab.h> #include <linux/mtio.h>
drivers/block/rd.c +0 -1
@@ -50,7 +50,6 @@#include <linux/module.h> #include <linux/moduleparam.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/pagemap.h> #include <linux/blkdev.h> #include <linux/genhd.h>
drivers/block/swim3.c +0 -1
@@ -25,7 +25,6 @@#include <linux/fd.h> #include <linux/ioctl.h> #include <linux/blkdev.h> -#include <linux/devfs_fs_kernel.h> #include <linux/interrupt.h> #include <linux/module.h> #include <asm/io.h>
drivers/block/sx8.c +0 -1
@@ -18,7 +18,6 @@#include <linux/spinlock.h> #include <linux/blkdev.h> #include <linux/sched.h> -#include <linux/devfs_fs_kernel.h> #include <linux/interrupt.h> #include <linux/compiler.h> #include <linux/workqueue.h>
drivers/block/ub.c +0 -1
@@ -28,7 +28,6 @@#include <linux/module.h> #include <linux/usb.h> #include <linux/blkdev.h> -#include <linux/devfs_fs_kernel.h> #include <linux/timer.h> #include <scsi/scsi.h>
drivers/ide/ide-probe.c +0 -1
@@ -47,7 +47,6 @@#include <linux/slab.h> #include <linux/delay.h> #include <linux/ide.h> -#include <linux/devfs_fs_kernel.h> #include <linux/spinlock.h> #include <linux/kmod.h> #include <linux/pci.h>
drivers/ide/ide-tape.c +0 -1
@@ -434,7 +434,6 @@#include <linux/mm.h> #include <linux/interrupt.h> #include <linux/major.h> -#include <linux/devfs_fs_kernel.h> #include <linux/errno.h> #include <linux/genhd.h> #include <linux/slab.h>
drivers/ide/ide.c +0 -1
@@ -147,7 +147,6 @@#include <linux/pci.h> #include <linux/delay.h> #include <linux/ide.h> -#include <linux/devfs_fs_kernel.h> #include <linux/completion.h> #include <linux/reboot.h> #include <linux/cdrom.h>
drivers/input/evdev.c +0 -1
@@ -20,7 +20,6 @@#include <linux/major.h> #include <linux/smp_lock.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> struct evdev {int exist;
drivers/input/input.c +0 -1
@@ -22,7 +22,6 @@#include <linux/interrupt.h> #include <linux/poll.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Input core" );
drivers/input/joydev.c +0 -1
@@ -26,7 +26,6 @@#include <linux/init.h> #include <linux/smp_lock.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> MODULE_AUTHOR ("Vojtech Pavlik <[email protected]>" );MODULE_DESCRIPTION ("Joystick device interfaces" );
drivers/input/mousedev.c +0 -1
@@ -24,7 +24,6 @@#include <linux/random.h> #include <linux/major.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX #include <linux/miscdevice.h> #endif
drivers/input/serio/serio_raw.c +0 -1
@@ -16,7 +16,6 @@#include <linux/init.h> #include <linux/major.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> #include <linux/miscdevice.h> #include <linux/wait.h>
drivers/input/tsdev.c +0 -1
@@ -53,7 +53,6 @@#include <linux/random.h> #include <linux/time.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> #ifndef CONFIG_INPUT_TSDEV_SCREEN_X #define CONFIG_INPUT_TSDEV_SCREEN_X 240
drivers/char/dsp56k.c +0 -1
@@ -33,7 +33,6 @@#include <linux/fs.h> #include <linux/mm.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #include <linux/device.h>
drivers/char/dtlk.c +0 -1
@@ -62,7 +62,6 @@#include <linux/init.h> /* for __init, module_{init,exit} */ #include <linux/poll.h> /* for POLLIN, etc. */ #include <linux/dtlk.h> /* local header file for DoubleTalk values */ -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #ifdef TRACING
drivers/char/lp.c +0 -1
@@ -120,7 +120,6 @@#include <linux/major.h> #include <linux/sched.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/slab.h> #include <linux/fcntl.h> #include <linux/delay.h>
drivers/char/mem.c +0 -1
@@ -20,7 +20,6 @@#include <linux/tty.h> #include <linux/capability.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/ptrace.h> #include <linux/device.h> #include <linux/backing-dev.h>
drivers/char/pty.c +0 -1
@@ -24,7 +24,6 @@#include <linux/major.h> #include <linux/mm.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/sysctl.h> #include <asm/uaccess.h>
drivers/char/vc_screen.c +0 -1
@@ -26,7 +26,6 @@#include <linux/major.h> #include <linux/errno.h> #include <linux/tty.h> -#include <linux/devfs_fs_kernel.h> #include <linux/sched.h> #include <linux/interrupt.h> #include <linux/mm.h>
drivers/i2c/i2c-dev.c +0 -1
@@ -34,7 +34,6 @@#include <linux/fs.h> #include <linux/slab.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/init.h> #include <linux/i2c.h> #include <linux/i2c-dev.h>
drivers/media/dvb/dvb-core/dvbdev.h +0 -1
@@ -27,7 +27,6 @@#include <linux/poll.h> #include <linux/fs.h> #include <linux/list.h> -#include <linux/devfs_fs_kernel.h> #include <linux/smp_lock.h> #define DVB_MAJOR 212
drivers/media/dvb/ttpci/av7110.h +0 -4
@@ -6,10 +6,6 @@#include <linux/netdevice.h> #include <linux/i2c.h> -#ifdef CONFIG_DEVFS_FS -#include <linux/devfs_fs_kernel.h> -#endif -#include <linux/dvb/video.h> #include <linux/dvb/audio.h> #include <linux/dvb/dmx.h>
drivers/media/video/arv.c +0 -1
@@ -20,7 +20,6 @@#include <linux/config.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/module.h> #include <linux/version.h> #include <linux/delay.h>
drivers/media/video/videodev.c +0 -1
@@ -26,7 +26,6 @@#include <linux/init.h> #include <linux/kmod.h> #include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include <asm/system.h> #include <asm/semaphore.h>
drivers/net/ppp_generic.c +0 -1
@@ -28,7 +28,6 @@#include <linux/kmod.h> #include <linux/init.h> #include <linux/list.h> -#include <linux/devfs_fs_kernel.h> #include <linux/netdevice.h> #include <linux/poll.h> #include <linux/ppp_defs.h>
drivers/net/wan/cosa.c +0 -1
@@ -85,7 +85,6 @@#include <linux/slab.h> #include <linux/poll.h> #include <linux/fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/interrupt.h> #include <linux/delay.h> #include <linux/errno.h>
drivers/s390/block/dasd_int.h +0 -1
@@ -54,7 +54,6 @@#include <linux/module.h> #include <linux/wait.h> #include <linux/blkdev.h> -#include <linux/devfs_fs_kernel.h> #include <linux/genhd.h> #include <linux/hdreg.h> #include <linux/interrupt.h>
drivers/s390/block/xpram.c +0 -1
@@ -36,7 +36,6 @@#include <linux/hdreg.h> /* HDIO_GETGEO */ #include <linux/sysdev.h> #include <linux/bio.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #define XPRAM_NAME "xpram"
drivers/s390/net/ctctty.c +0 -1
@@ -29,7 +29,6 @@#include <linux/interrupt.h> #include <linux/delay.h> #include <asm/uaccess.h> -#include <linux/devfs_fs_kernel.h> #include "ctctty.h" #include "ctcdbug.h"
drivers/char/ftape/zftape/zftape-init.c +0 -1
@@ -33,7 +33,6 @@#endif #include <linux/fcntl.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/zftape.h> #include <linux/init.h>
drivers/char/ip2main.c +0 -1
@@ -91,7 +91,6 @@#include <linux/module.h> #include <linux/signal.h> #include <linux/sched.h> -#include <linux/devfs_fs_kernel.h> #include <linux/timer.h> #include <linux/interrupt.h> #include <linux/pci.h>
drivers/char/ipmi/ipmi_devintf.c +0 -1
@@ -40,7 +40,6 @@#include <linux/poll.h> #include <linux/spinlock.h> #include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <linux/ipmi.h> #include <asm/semaphore.h> #include <linux/init.h>
drivers/char/istallion.c +0 -1
@@ -39,7 +39,6 @@#include <linux/ioport.h> #include <linux/delay.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #include <linux/wait.h>
drivers/char/misc.c +0 -1
@@ -44,7 +44,6 @@#include <linux/slab.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> -#include <linux/devfs_fs_kernel.h> #include <linux/stat.h> #include <linux/init.h> #include <linux/device.h>
drivers/char/mmtimer.c +0 -1
@@ -25,7 +25,6 @@#include <linux/init.h> #include <linux/errno.h> #include <linux/mm.h> -#include <linux/devfs_fs_kernel.h> #include <linux/mmtimer.h> #include <linux/miscdevice.h> #include <linux/posix-timers.h>
drivers/char/ppdev.c +0 -1
@@ -60,7 +60,6 @@#include <linux/init.h> #include <linux/sched.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> #include <linux/ioctl.h> #include <linux/parport.h> #include <linux/ctype.h>
drivers/char/raw.c +0 -1
@@ -10,7 +10,6 @@#include <linux/init.h> #include <linux/fs.h> -#include <linux/devfs_fs_kernel.h> #include <linux/major.h> #include <linux/blkdev.h> #include <linux/module.h>
drivers/char/stallion.c +0 -1
@@ -40,7 +40,6 @@#include <linux/ioport.h> #include <linux/init.h> #include <linux/smp_lock.h> -#include <linux/devfs_fs_kernel.h> #include <linux/device.h> #include <linux/delay.h>
drivers/char/tipar.c +0 -1
@@ -56,7 +56,6 @@#include <linux/ioport.h> #include <asm/io.h> #include <linux/bitops.h> -#include <linux/devfs_fs_kernel.h> /* DevFs support */ #include <linux/parport.h> /* Our code depend on parport */ #include <linux/device.h>
drivers/char/tty_io.c +0 -1
@@ -101,7 +101,6 @@#include <linux/kbd_kern.h> #include <linux/vt_kern.h> #include <linux/selection.h> -#include <linux/devfs_fs_kernel.h> #include <linux/kmod.h>
drivers/char/viotape.c +0 -1
@@ -44,7 +44,6 @@#include <linux/dma-mapping.h> #include <linux/fs.h> #include <linux/cdev.h> -#include <linux/devfs_fs_kernel.h> #include <linux/major.h> #include <linux/completion.h> #include <linux/proc_fs.h>
drivers/char/vt.c +0 -1
@@ -79,7 +79,6 @@#include <linux/mm.h> #include <linux/console.h> #include <linux/init.h> -#include <linux/devfs_fs_kernel.h> #include <linux/vt_kern.h> #include <linux/selection.h> #include <linux/tiocl.h>
drivers/isdn/capi/capi.c +0 -1
@@ -39,7 +39,6 @@#include <linux/init.h> #include <linux/device.h> #include <linux/moduleparam.h> -#include <linux/devfs_fs_kernel.h> #include <linux/isdn/capiutil.h> #include <linux/isdn/capicmd.h> #if defined(CONFIG_ISDN_CAPI_CAPIFS ) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE )
drivers/isdn/hardware/eicon/divamnt.c +0 -1
@@ -17,7 +17,6 @@#include <linux/sched.h> #include <linux/smp_lock.h> #include <linux/poll.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include "platform.h"
drivers/isdn/hardware/eicon/divasi.c +0 -1
@@ -19,7 +19,6 @@#include <linux/poll.h> #include <linux/proc_fs.h> #include <linux/skbuff.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include "platform.h"
drivers/isdn/hardware/eicon/divasmain.c +0 -1
@@ -14,7 +14,6 @@#include <linux/init.h> #include <linux/kernel.h> #include <linux/sched.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include <asm/io.h> #include <linux/ioport.h>
drivers/scsi/osst.c +0 -1
@@ -48,7 +48,6 @@#include <linux/vmalloc.h> #include <linux/blkdev.h> #include <linux/moduleparam.h> -#include <linux/devfs_fs_kernel.h> #include <linux/delay.h> #include <asm/uaccess.h> #include <asm/dma.h>
drivers/scsi/scsi.c +0 -1
@@ -48,7 +48,6 @@#include <linux/delay.h> #include <linux/init.h> #include <linux/completion.h> -#include <linux/devfs_fs_kernel.h> #include <linux/unistd.h> #include <linux/spinlock.h> #include <linux/kmod.h>
drivers/scsi/sg.c +0 -1
@@ -44,7 +44,6 @@#include <linux/poll.h> #include <linux/smp_lock.h> #include <linux/moduleparam.h> -#include <linux/devfs_fs_kernel.h> #include <linux/cdev.h> #include <linux/seq_file.h> #include <linux/blkdev.h>
drivers/scsi/st.c +0 -1
@@ -34,7 +34,6 @@#include <linux/spinlock.h> #include <linux/blkdev.h> #include <linux/moduleparam.h> -#include <linux/devfs_fs_kernel.h> #include <linux/cdev.h> #include <linux/delay.h>
drivers/usb/core/file.c +0 -1
@@ -17,7 +17,6 @@#include <linux/config.h> #include <linux/module.h> -#include <linux/devfs_fs_kernel.h> #include <linux/spinlock.h> #include <linux/errno.h>
drivers/usb/input/hiddev.c +0 -1
@@ -35,7 +35,6 @@#include <linux/usb.h> #include "hid.h" #include <linux/hiddev.h> -#include <linux/devfs_fs_kernel.h> #ifdef CONFIG_USB_DYNAMIC_MINORS #define HIDDEV_MINOR_BASE 0
drivers/cdrom/cdu31a.c +0 -1
@@ -161,7 +161,6 @@#include <linux/hdreg.h> #include <linux/genhd.h> #include <linux/ioport.h> -#include <linux/devfs_fs_kernel.h> #include <linux/string.h> #include <linux/slab.h> #include <linux/init.h>
drivers/cdrom/cm206.c +0 -1
@@ -187,7 +187,6 @@#include <linux/interrupt.h> #include <linux/timer.h> #include <linux/cdrom.h> -#include <linux/devfs_fs_kernel.h> #include <linux/ioport.h> #include <linux/mm.h> #include <linux/slab.h>
drivers/cdrom/mcdx.c +0 -1
@@ -74,7 +74,6 @@#include <linux/major.h> #define MAJOR_NR MITSUMI_X_CDROM_MAJOR#include <linux/blkdev.h> -#include <linux/devfs_fs_kernel.h> #include "mcdx.h"
drivers/cdrom/sbpcd.c +0 -1
@@ -371,7 +371,6 @@#include <linux/kernel.h> #include <linux/cdrom.h> #include <linux/ioport.h> -#include <linux/devfs_fs_kernel.h> #include <linux/major.h> #include <linux/string.h> #include <linux/vmalloc.h>
drivers/ieee1394/ieee1394_core.h +0 -1
@@ -3,7 +3,6 @@#define _IEEE1394_CORE_H#include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <asm/atomic.h> #include <asm/semaphore.h> #include "hosts.h"
drivers/ieee1394/raw1394.c +0 -1
@@ -41,7 +41,6 @@#include <linux/cdev.h> #include <asm/uaccess.h> #include <asm/atomic.h> -#include <linux/devfs_fs_kernel.h> #include "csr1212.h" #include "ieee1394.h"
drivers/ieee1394/video1394.c +0 -1
@@ -54,7 +54,6 @@#include <linux/poll.h> #include <linux/smp_lock.h> #include <linux/delay.h> -#include <linux/devfs_fs_kernel.h> #include <linux/bitops.h> #include <linux/types.h> #include <linux/vmalloc.h>
drivers/macintosh/adb.c +0 -1
@@ -36,7 +36,6 @@#include <linux/spinlock.h> #include <linux/completion.h> #include <linux/device.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include <asm/semaphore.h>
drivers/md/dm-ioctl.c +0 -1
@@ -13,7 +13,6 @@#include <linux/init.h> #include <linux/wait.h> #include <linux/slab.h> -#include <linux/devfs_fs_kernel.h> #include <linux/dm-ioctl.h> #include <asm/uaccess.h>
drivers/md/md.c +0 -1
@@ -34,7 +34,6 @@#include <linux/linkage.h> #include <linux/raid/md.h> #include <linux/sysctl.h> -#include <linux/devfs_fs_kernel.h> #include <linux/buffer_head.h> /* for invalidate_bdev */ #include <linux/suspend.h>
drivers/mmc/mmc_block.c +0 -1
@@ -27,7 +27,6 @@#include <linux/hdreg.h> #include <linux/kdev_t.h> #include <linux/blkdev.h> -#include <linux/devfs_fs_kernel.h> #include <linux/mmc/card.h> #include <linux/mmc/protocol.h>
drivers/mtd/mtd_blkdevs.c +0 -1
@@ -21,7 +21,6 @@#include <linux/init.h> #include <asm/semaphore.h> #include <asm/uaccess.h> -#include <linux/devfs_fs_kernel.h> static LIST_HEAD (blktrans_majors);
drivers/sbus/char/bpp.c +0 -1
@@ -20,7 +20,6 @@#include <linux/timer.h> #include <linux/ioport.h> #include <linux/major.h> -#include <linux/devfs_fs_kernel.h> #include <asm/uaccess.h> #include <asm/io.h>
drivers/sbus/char/vfc.h +0 -2
@@ -1,8 +1,6 @@#ifndef _LINUX_VFC_H_#define _LINUX_VFC_H_ -#include <linux/devfs_fs_kernel.h> -/* * The control register for the vfc is at offset 0x4000 * The first field ram bank is located at offset 0x5000
drivers/telephony/phonedev.c +0 -1
@@ -28,7 +28,6 @@#include <linux/kmod.h> #include <linux/sem.h> -#include <linux/devfs_fs_kernel.h> #define PHONE_NUM_DEVICES 256
include/linux/devfs_fs_kernel.h deleted +0 -10
@@ -1,10 +0,0 @@ -#ifndef _LINUX_DEVFS_FS_KERNEL_H -#define _LINUX_DEVFS_FS_KERNEL_H - -#include <linux/fs.h> -#include <linux/config.h> -#include <linux/spinlock.h> -#include <linux/types.h> -#include <asm/semaphore.h> - -#endif /* _LINUX_DEVFS_FS_KERNEL_H */
PATCH 1/1 Remove the miscdevice devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- arch/i386/kernel/microcode.c | 1 - arch/sh/kernel/cpu/sh4/sq.c | 1 - drivers/block/pktcdvd.c | 1 - drivers/char/misc.c | 4 ---- drivers/char/mmtimer.c | 1 - drivers/md/dm-ioctl.c | 1 - drivers/media/radio/miropcm20-rds.c | 1 - drivers/net/tun.c | 1 - drivers/s390/char/monreader.c | 1 - drivers/s390/crypto/z90main.c | 1 - include/linux/miscdevice.h | 1 - 11 files changed, 14 deletions(-)
arch/i386/kernel/microcode.c +0 -1
@@ -480,7 +480,6 @@static struct miscdevice microcode_dev = { .minor =MICROCODE_MINOR , .name ="microcode" , - .devfs_name ="cpu/microcode" , .fops = µcode_fops, };
drivers/block/pktcdvd.c +0 -1
@@ -2633,7 +2633,6 @@static struct miscdevice pkt_misc = { .minor =MISC_DYNAMIC_MINOR , .name ="pktcdvd" , - .devfs_name ="pktcdvd/control" , .fops = &pkt_ctl_fops };
drivers/char/misc.c +0 -4
@@ -231,10 +231,6 @@if (misc->minor <DYNAMIC_MINORS ) misc_minors[misc->minor >>3 ] |=1 << (misc->minor &7 ); -if (misc->devfs_name[0 ] =='\0' ) { -snprintf (misc->devfs_name,sizeof (misc->devfs_name), -"misc/%s" , misc->name); - } dev =MKDEV (MISC_MAJOR , misc->minor); misc->class = class_device_create(misc_class, dev, misc->dev,
drivers/media/radio/miropcm20-rds.c +0 -1
@@ -114,7 +114,6 @@static struct miscdevice rds_miscdev = { .minor =MISC_DYNAMIC_MINOR , .name ="radiotext" , - .devfs_name ="v4l/rds/radiotext" , .fops = &rds_fops, };
drivers/net/tun.c +0 -1
@@ -759,7 +759,6 @@ .minor = TUN_MINOR, .name = "tun", .fops = &tun_fops, - .devfs_name = "net/tun", };/* ethtool interface */
drivers/s390/char/monreader.c +0 -1
@@ -588,7 +588,6 @@static struct miscdevice mon_dev = { .name ="monreader" , - .devfs_name ="monreader" , .fops = &mon_fops, .minor =MISC_DYNAMIC_MINOR , };
include/linux/miscdevice.h +0 -1
@@ -40,7 +40,6 @@struct list_head list;struct device *dev;struct class_device *class; -char devfs_name[64 ]; };extern int misc_register (struct miscdevice * misc);
drivers/md/dm-ioctl.c +0 -1
@@ -1350,7 +1350,6 @@static struct miscdevice _dm_misc = { .minor =MISC_DYNAMIC_MINOR , .name =DM_NAME , - .devfs_name ="mapper/control" , .fops = &_ctl_fops };
drivers/s390/crypto/z90main.c +0 -1
@@ -449,7 +449,6 @@ .minor = Z90CRYPT_MINOR, .name = DEV_NAME, .fops = &z90crypt_fops, - .devfs_name =DEV_NAME };#endif
arch/sh/kernel/cpu/sh4/sq.c +0 -1
@@ -417,7 +417,6 @@static struct miscdevice sq_dev = { .minor =STORE_QUEUE_MINOR , .name ="sq" , - .devfs_name ="cpu/sq" , .fops = &sq_fops, };
drivers/char/mmtimer.c +0 -1
@@ -704,7 +704,6 @@return -1 ; } -strcpy (mmtimer_miscdev.devfs_name,MMTIMER_NAME );if (misc_register (&mmtimer_miscdev)) {printk (KERN_ERR "%s: failed to register device\n" ,MMTIMER_NAME );
PATCH 1/1 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.
--- arch/um/drivers/ubd_kern.c | 8 ++------ drivers/block/DAC960.c | 1 - drivers/block/acsi.c | 5 +---- drivers/block/cciss.c | 1 - drivers/block/cpqarray.c | 2 -- drivers/block/loop.c | 1 - drivers/block/nbd.c | 1 - drivers/block/ps2esdi.c | 1 - drivers/block/rd.c | 1 - drivers/block/swim3.c | 1 - drivers/block/sx8.c | 1 - drivers/block/ub.c | 2 -- drivers/block/umem.c | 1 - drivers/block/viodasd.c | 2 -- drivers/block/xd.c | 1 - drivers/block/z2ram.c | 1 - drivers/cdrom/aztcd.c | 1 - drivers/cdrom/gscd.c | 1 - drivers/cdrom/optcd.c | 1 - drivers/cdrom/sbpcd.c | 1 - drivers/cdrom/sjcd.c | 1 - drivers/cdrom/sonycd535.c | 1 - drivers/cdrom/viocd.c | 2 -- drivers/ide/ide-cd.c | 2 -- drivers/ide/ide-disk.c | 1 - drivers/ide/ide-floppy.c | 1 - drivers/md/md.c | 7 ++----- drivers/message/i2o/i2o_block.c | 1 - drivers/mmc/mmc_block.c | 1 - drivers/mtd/mtd_blkdevs.c | 2 -- drivers/s390/block/dasd_genhd.c | 2 -- drivers/s390/block/xpram.c | 1 - drivers/scsi/osst.c | 1 - drivers/scsi/sd.c | 2 -- drivers/scsi/sr.c | 2 -- drivers/scsi/st.c | 2 -- include/linux/genhd.h | 2 -- 37 files changed, 5 insertions(+), 60 deletions(-)
drivers/block/loop.c +0 -1
@@ -1286,7 +1286,6 @@ disk->first_minor = i; disk->fops = &lo_fops;sprintf (disk->disk_name,"loop%d" , i); -sprintf (disk->devfs_name,"loop/%d" , i); disk->private_data = lo; disk->queue = lo->lo_queue; }
drivers/block/rd.c +0 -1
@@ -456,7 +456,6 @@ disk->queue = rd_queue[i]; disk->flags |=GENHD_FL_SUPPRESS_PARTITION_INFO ;sprintf (disk->disk_name,"ram%d" , i); -sprintf (disk->devfs_name,"rd/%d" , i);set_capacity (disk, rd_size *2 );add_disk (rd_disks[i]); }
drivers/ide/ide-cd.c +0 -2
@@ -3469,8 +3469,6 @@ drive->driver_data = info; g->minors =1 ; -snprintf (g->devfs_name,sizeof (g->devfs_name), -"%s/cd" , drive->devfs_name); g->driverfs_dev = &drive->gendev; g->flags =GENHD_FL_CD |GENHD_FL_REMOVABLE ;if (ide_cdrom_setup (drive)) {
drivers/ide/ide-disk.c +0 -1
@@ -1244,7 +1244,6 @@ drive->attach =1 ; g->minors =1 <<PARTN_BITS ; -strcpy (g->devfs_name, drive->devfs_name); g->driverfs_dev = &drive->gendev; g->flags = drive->removable ?GENHD_FL_REMOVABLE :0 ;set_capacity (g,idedisk_capacity (drive));
drivers/ide/ide-floppy.c +0 -1
@@ -2169,7 +2169,6 @@ g->minors =1 <<PARTN_BITS ; g->driverfs_dev = &drive->gendev; -strcpy (g->devfs_name, drive->devfs_name); g->flags = drive->removable ?GENHD_FL_REMOVABLE :0 ; g->fops = &idefloppy_ops; drive->attach =1 ;
include/linux/genhd.h +0 -2
@@ -110,8 +110,6 @@sector_t capacity;int flags; -char devfs_name[64 ];/* devfs crap */ -int number;/* more of the same */ struct device *driverfs_dev;struct kobject kobj;
drivers/block/ub.c +0 -2
@@ -32,7 +32,6 @@#include <scsi/scsi.h> #define DRV_NAME "ub" -#define DEVFS_NAME DRV_NAME#define UB_MAJOR 180
@@ -2151,7 +2150,6 @@ lun->disk = disk;sprintf (disk->disk_name,DRV_NAME "%c" , lun->id +'a' ); -sprintf (disk->devfs_name,DEVFS_NAME "/%c" , lun->id +'a' ); disk->major =UB_MAJOR ; disk->first_minor = lun->id *UB_MINORS_PER_MAJOR ; disk->fops = &ub_bd_fops;
drivers/mmc/mmc_block.c +0 -1
@@ -344,7 +344,6 @@*/ sprintf (md->disk->disk_name,"mmcblk%d" , devidx); -sprintf (md->disk->devfs_name,"mmc/blk%d" , devidx); md->block_bits = card->csd.read_blkbits;
drivers/scsi/sd.c +0 -2
@@ -1594,8 +1594,6 @@ 'a' + m1, 'a' + m2, 'a' + m3); } -strcpy (gd->devfs_name, sdp->devfs_name); - gd->private_data = &sdkp->driver;sd_revalidate_disk (gd);
drivers/scsi/osst.c +0 -1
@@ -5801,7 +5801,6 @@snprintf (name,8 ,"%s%s" ,"n" ,tape_name (tpnt));osst_sysfs_add (MKDEV (OSST_MAJOR , dev_num +128 ), dev, tpnt, name); } - drive->number =-1 ; printk(KERN_INFO "osst :I: Attached OnStream %.5s tape at scsi%d, channel %d, id %d, lun %d as %s\n",
drivers/scsi/sr.c +0 -2
@@ -622,8 +622,6 @@get_capabilities (cd);sr_vendor_init (cd); -snprintf (disk->devfs_name,sizeof (disk->devfs_name), -"%s/cd" , sdev->devfs_name); disk->driverfs_dev = &sdev->sdev_gendev;set_capacity (disk, cd->capacity); disk->private_data = &cd->driver;
drivers/scsi/st.c +0 -2
@@ -3983,8 +3983,6 @@do_create_class_files (tpnt, dev_num, mode); } - disk->number =-1 ; -printk (KERN_WARNING "Attached scsi tape %s at scsi%d, channel %d, id %d, lun %d\n" ,tape_name (tpnt), SDp->host->host_no, SDp->channel, SDp->id, SDp->lun);
drivers/cdrom/aztcd.c +0 -1
@@ -1918,7 +1918,6 @@ azt_disk->first_minor =0 ; azt_disk->fops = &azt_fops;sprintf (azt_disk->disk_name,"aztcd" ); -sprintf (azt_disk->devfs_name,"aztcd" ); azt_disk->queue = azt_queue;add_disk (azt_disk);azt_invalidate_buffers ();
drivers/cdrom/gscd.c +0 -1
@@ -955,7 +955,6 @@ gscd_disk->first_minor =0 ; gscd_disk->fops = &gscd_fops;sprintf (gscd_disk->disk_name,"gscd" ); -sprintf (gscd_disk->devfs_name,"gscd" );if (register_blkdev (MAJOR_NR ,"gscd" )) { ret = -EIO ;
drivers/cdrom/optcd.c +0 -1
@@ -2033,7 +2033,6 @@ optcd_disk->first_minor =0 ; optcd_disk->fops = &opt_fops;sprintf (optcd_disk->disk_name,"optcd" ); -sprintf (optcd_disk->devfs_name,"optcd" );if (!request_region (optcd_port,4 ,"optcd" )) { printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n",
drivers/cdrom/sbpcd.c +0 -1
@@ -5873,7 +5873,6 @@ disk->fops = &sbpcd_bdops;strcpy (disk->disk_name, sbpcd_infop->name); disk->flags =GENHD_FL_CD ; -sprintf (disk->devfs_name,"sbp/c0t%d" , p->drv_id); p->disk = disk;if (register_cdrom (sbpcd_infop)) {
drivers/cdrom/sjcd.c +0 -1
@@ -1695,7 +1695,6 @@ sjcd_disk->first_minor =0 , sjcd_disk->fops = &sjcd_fops,sprintf (sjcd_disk->disk_name,"sjcd" ); -sprintf (sjcd_disk->devfs_name,"sjcd" );if (!request_region (sjcd_base,4 ,"sjcd" )) { printk
drivers/cdrom/sonycd535.c +0 -1
@@ -1590,7 +1590,6 @@ cdu_disk->first_minor =0 ; cdu_disk->fops = &cdu_fops;sprintf (cdu_disk->disk_name,"cdu" ); -sprintf (cdu_disk->devfs_name,"cdu535" );if (!request_region (sony535_cd_base_io,4 ,CDU535_HANDLE )) { printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n",
drivers/cdrom/viocd.c +0 -2
@@ -690,8 +690,6 @@ gendisk->first_minor = deviceno;strncpy (gendisk->disk_name, c->name,sizeof (gendisk->disk_name)); -snprintf (gendisk->devfs_name,sizeof (gendisk->devfs_name), -VIOCD_DEVICE_DEVFS "%d" , deviceno);blk_queue_max_hw_segments (q,1 );blk_queue_max_phys_segments (q,1 );blk_queue_max_sectors (q,4096 /512 );
drivers/md/md.c +2 -5
@@ -1470,13 +1470,10 @@ } disk->major =MAJOR (dev); disk->first_minor = unit << shift; -if (partitioned) { +if (partitioned)sprintf (disk->disk_name,"md_d%d" , unit); -sprintf (disk->devfs_name,"md/d%d" , unit); - }else { +else sprintf (disk->disk_name,"md%d" , unit); -sprintf (disk->devfs_name,"md/%d" , unit); - } disk->fops = &md_fops; disk->private_data = mddev; disk->queue = mddev->queue;
drivers/block/DAC960.c +0 -1
@@ -2546,7 +2546,6 @@blk_queue_max_sectors (RequestQueue, Controller->MaxBlocksPerCommand); disk->queue = RequestQueue;sprintf (disk->disk_name,"rd/c%dd%d" , Controller->ControllerNumber, n); -sprintf (disk->devfs_name,"rd/host%d/target%d" , Controller->ControllerNumber, n); disk->major = MajorNumber; disk->first_minor = n << DAC960_MaxPartitionsBits; disk->fops = &DAC960_BlockDeviceOperations;
drivers/block/acsi.c +1 -4
@@ -1731,13 +1731,10 @@struct gendisk *disk = acsi_gendisk[i];sprintf (disk->disk_name,"ad%c" ,'a' +i); aip = &acsi_info[NDevices]; -sprintf (disk->devfs_name,"ad/target%d/lun%d" , aip->target, aip->lun); disk->major =ACSI_MAJOR ; disk->first_minor = i <<4 ; -if (acsi_info[i].type !=HARDDISK ) { +if (acsi_info[i].type !=HARDDISK ) disk->minors =1 ; -strcat (disk->devfs_name,"/disc" ); - } disk->fops = &acsi_fops; disk->private_data = &acsi_info[i];set_capacity (disk, acsi_info[i].size);
drivers/block/cciss.c +0 -1
@@ -2843,7 +2843,6 @@struct gendisk *disk = hba[i]->gendisk[j];sprintf (disk->disk_name,"cciss/c%dd%d" , i, j); -sprintf (disk->devfs_name,"cciss/host%d/target%d" , i, j); disk->major = hba[i]->major; disk->first_minor = j <<NWD_SHIFT ; disk->fops = &cciss_fops;
drivers/block/cpqarray.c +0 -2
@@ -1803,8 +1803,6 @@ } -sprintf (disk->devfs_name,"ida/c%dd%d" , ctlr, log_unit); - info_p->phys_drives = sense_config_buf->ctlr_phys_drv; info_p->drv_assign_map
drivers/block/nbd.c +0 -1
@@ -693,7 +693,6 @@ disk->private_data = &nbd_dev[i]; disk->flags |=GENHD_FL_SUPPRESS_PARTITION_INFO ;sprintf (disk->disk_name,"nbd%d" , i); -sprintf (disk->devfs_name,"nbd/%d" , i);set_capacity (disk,0x7ffffc00ULL <<1 );/* 2 TB */ add_disk (disk); }
drivers/block/ps2esdi.c +0 -1
@@ -422,7 +422,6 @@ disk->major =PS2ESDI_MAJOR ; disk->first_minor = i<<6 ;sprintf (disk->disk_name,"ed%c" ,'a' +i); -sprintf (disk->devfs_name,"ed/target%d" , i); disk->fops = &ps2esdi_fops; ps2esdi_gendisk[i] = disk; }
drivers/block/swim3.c +0 -1
@@ -1057,7 +1057,6 @@ disk->queue = swim3_queue; disk->flags |=GENHD_FL_REMOVABLE ;sprintf (disk->disk_name,"fd%d" , i); -sprintf (disk->devfs_name,"floppy/%d" , i);set_capacity (disk,2880 );add_disk (disk); }
drivers/block/sx8.c +0 -1
@@ -1504,7 +1504,6 @@ port->disk = disk;sprintf (disk->disk_name,DRV_NAME "/%u" , (unsigned int ) (host->id *CARM_MAX_PORTS ) + i); -sprintf (disk->devfs_name,DRV_NAME "/%u_%u" , host->id, i); disk->major = host->major; disk->first_minor = i *CARM_MINORS_PER_MAJOR ; disk->fops = &carm_bd_ops;
drivers/block/umem.c +0 -1
@@ -1205,7 +1205,6 @@for (i =0 ; i < num_cards; i++) {struct gendisk *disk = mm_gendisk[i];sprintf (disk->disk_name,"umem%c" ,'a' +i); -sprintf (disk->devfs_name,"umem/card%d" , i);spin_lock_init (&cards[i].lock); disk->major = major_nr; disk->first_minor = i <<MM_SHIFT ;
drivers/block/viodasd.c +0 -2
@@ -551,8 +551,6 @@else snprintf (g->disk_name,sizeof (g->disk_name),VIOD_GENHD_NAME "%c" ,'a' + (dev_no %26 )); -snprintf (g->devfs_name,sizeof (g->devfs_name), -"%s%d" ,VIOD_GENHD_DEVFS_NAME , dev_no); g->fops = &viodasd_fops; g->queue = q; g->private_data = d;
drivers/block/xd.c +0 -1
@@ -211,7 +211,6 @@ disk->major =XT_DISK_MAJOR ; disk->first_minor = i<<6 ;sprintf (disk->disk_name,"xd%c" , i+'a' ); -sprintf (disk->devfs_name,"xd/target%d" , i); disk->fops = &xd_fops; disk->private_data = p; disk->queue = xd_queue;
drivers/block/z2ram.c +0 -1
@@ -354,7 +354,6 @@ z2ram_gendisk->first_minor =0 ; z2ram_gendisk->fops = &z2_fops;sprintf (z2ram_gendisk->disk_name,"z2ram" ); -strcpy (z2ram_gendisk->devfs_name, z2ram_gendisk->disk_name); z2ram_gendisk->queue = z2_queue;add_disk (z2ram_gendisk);
arch/um/drivers/ubd_kern.c +2 -6
@@ -628,14 +628,10 @@ disk->first_minor = unit <<UBD_SHIFT ; disk->fops = &ubd_blops;set_capacity (disk, size /512 ); -if (major ==MAJOR_NR ){ +if (major ==MAJOR_NR )sprintf (disk->disk_name,"ubd%c" ,'a' + unit); -sprintf (disk->devfs_name,"ubd/disc%d" , unit); - } -else { +else sprintf (disk->disk_name,"ubd_fake%d" , unit); -sprintf (disk->devfs_name,"ubd_fake/disc%d" , unit); - }/* sysfs register (not for ide fake devices) */ if (major ==MAJOR_NR ) {
drivers/message/i2o/i2o_block.c +0 -1
@@ -1079,7 +1079,6 @@ gd = i2o_blk_dev->gd; gd->first_minor = unit <<4 ;sprintf (gd->disk_name,"i2o/hd%c" ,'a' + unit); -sprintf (gd->devfs_name,"i2o/hd%c" ,'a' + unit); gd->driverfs_dev = &i2o_dev->device;/* setup request queue */
drivers/mtd/mtd_blkdevs.c +0 -2
@@ -291,8 +291,6 @@snprintf (gd->disk_name,sizeof (gd->disk_name),"%s%c" , tr->name, (tr->part_bits?'a' :'0' ) + new->devnum); -snprintf (gd->devfs_name,sizeof (gd->devfs_name), -"%s/%c" , tr->name, (tr->part_bits?'a' :'0' ) + new->devnum);/* 2.5 has capacity in units of 512 bytes while still having BLOCK_SIZE_BITS set to 10. Just to keep us amused. */
drivers/s390/block/dasd_genhd.c +0 -2
@@ -73,8 +73,6 @@ } len +=sprintf (gdp->disk_name + len,"%c" ,'a' +(device->devindex%26 )); -sprintf (gdp->devfs_name,"dasd/%s" , device->cdev->dev.bus_id); -if (feature_ro)set_disk_ro (gdp,1 ); gdp->private_data = device;
drivers/s390/block/xpram.c +0 -1
@@ -470,7 +470,6 @@ disk->private_data = &xpram_devices[i]; disk->queue = xpram_queue;sprintf (disk->disk_name,"slram%d" , i); -sprintf (disk->devfs_name,"slram/%d" , i);set_capacity (disk, xpram_sizes[i] <<1 );add_disk (disk); }
PATCH 1/1 Remove the uart_driver devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- drivers/serial/21285.c | 1 - drivers/serial/8250.c | 1 - drivers/serial/au1x00_uart.c | 1 - drivers/serial/imx.c | 1 - drivers/serial/ip22zilog.c | 1 - drivers/serial/m32r_sio.c | 1 - drivers/serial/mcfserial.c | 1 - drivers/serial/mpc52xx_uart.c | 1 - drivers/serial/mpsc.c | 2 -- drivers/serial/pmac_zilog.c | 1 - drivers/serial/pxa.c | 1 - drivers/serial/s3c2410.c | 2 -- drivers/serial/sa1100.c | 1 - drivers/serial/serial_core.c | 1 - drivers/serial/serial_txx9.c | 3 --- drivers/serial/sh-sci.c | 3 --- drivers/serial/sunsab.c | 1 - drivers/serial/sunsu.c | 1 - drivers/serial/sunzilog.c | 1 - drivers/serial/v850e_uart.c | 1 - drivers/serial/vr41xx_siu.c | 1 - include/linux/serial_core.h | 1 - 22 files changed, 28 deletions(-)
include/linux/serial_core.h +0 -1
@@ -317,7 +317,6 @@struct module *owner;const char *driver_name;const char *dev_name; -const char *devfs_name;int major;int minor;int nr;
drivers/serial/21285.c +0 -1
@@ -495,7 +495,6 @@ .owner = THIS_MODULE, .driver_name = "ttyFB", .dev_name = "ttyFB", - .devfs_name = "ttyFB", .major = SERIAL_21285_MAJOR, .minor = SERIAL_21285_MINOR, .nr = 1,
drivers/serial/imx.c +0 -1
@@ -870,7 +870,6 @@ .owner = THIS_MODULE, .driver_name = DRIVER_NAME, .dev_name = "ttySMX", - .devfs_name = "ttsmx/", .major = SERIAL_IMX_MAJOR, .minor = MINOR_START, .nr = ARRAY_SIZE(imx_ports),
drivers/serial/ip22zilog.c +0 -1
@@ -1105,7 +1105,6 @@static struct uart_driver ip22zilog_reg = { .owner =THIS_MODULE , .driver_name ="serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =64 ,
drivers/serial/m32r_sio.c +0 -1
@@ -1152,7 +1152,6 @@static struct uart_driver m32r_sio_reg = { .owner =THIS_MODULE , .driver_name ="sio" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =64 ,
drivers/serial/mcfserial.c +0 -1
@@ -1670,7 +1670,6 @@/* Initialize the tty_driver structure */ mcfrs_serial_driver->owner =THIS_MODULE ; mcfrs_serial_driver->name ="ttyS" ; - mcfrs_serial_driver->devfs_name ="ttys/" ; mcfrs_serial_driver->driver_name ="serial" ; mcfrs_serial_driver->major =TTY_MAJOR ; mcfrs_serial_driver->minor_start =64 ;
drivers/serial/mpc52xx_uart.c +0 -1
@@ -704,7 +704,6 @@ .owner = THIS_MODULE, .driver_name = "mpc52xx_psc_uart", .dev_name = "ttyS", - .devfs_name = "ttyS", .major = TTY_MAJOR, .minor = 64, .nr = MPC52xx_PSC_MAXNUM,
drivers/serial/mpsc.c +0 -2
@@ -61,7 +61,6 @@#define MPSC_MAJOR 204#define MPSC_MINOR_START 44#define MPSC_DRIVER_NAME "MPSC" -#define MPSC_DEVFS_NAME "ttymm/"#define MPSC_DEV_NAME "ttyMM"#define MPSC_VERSION "1.00"
@@ -1611,7 +1610,6 @@static struct uart_driver mpsc_reg = { .owner =THIS_MODULE , .driver_name =MPSC_DRIVER_NAME , - .devfs_name =MPSC_DEVFS_NAME , .dev_name =MPSC_DEV_NAME , .major =MPSC_MAJOR , .minor =MPSC_MINOR_START ,
drivers/serial/pxa.c +0 -1
@@ -781,7 +781,6 @@static struct uart_driver serial_pxa_reg = { .owner =THIS_MODULE , .driver_name ="PXA serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =64 ,
drivers/serial/s3c2410.c +0 -2
@@ -151,7 +151,6 @@/* UART name and device definitions */ #define S3C24XX_SERIAL_NAME "ttySAC" -#define S3C24XX_SERIAL_DEVFS "tts/"#define S3C24XX_SERIAL_MAJOR 204#define S3C24XX_SERIAL_MINOR 64
@@ -967,7 +966,6 @@ .nr = 3, .cons = S3C24XX_SERIAL_CONSOLE, .driver_name = S3C24XX_SERIAL_NAME, - .devfs_name = S3C24XX_SERIAL_DEVFS, .major = S3C24XX_SERIAL_MAJOR, .minor = S3C24XX_SERIAL_MINOR, };
drivers/serial/serial_core.c +0 -1
@@ -2082,7 +2082,6 @@ normal->owner = drv->owner; normal->driver_name = drv->driver_name; - normal->devfs_name = drv->devfs_name; normal->name = drv->dev_name; normal->major = drv->major; normal->minor_start = drv->minor;
drivers/serial/serial_txx9.c +0 -3
@@ -62,12 +62,10 @@#if !defined(CONFIG_SERIAL_TXX9_STDSERIAL )/* "ttyS" is used for standard serial driver */ #define TXX9_TTY_NAME "ttyTX" -#define TXX9_TTY_DEVFS_NAME "tttx/"#define TXX9_TTY_MINOR_START (64 + 64)/* ttyTX0(128), ttyTX1(129) */ #else /* acts like standard serial driver */ #define TXX9_TTY_NAME "ttyS" -#define TXX9_TTY_DEVFS_NAME "tts/"#define TXX9_TTY_MINOR_START 64#endif #define TXX9_TTY_MAJOR TTY_MAJOR
@@ -998,7 +996,6 @@static struct uart_driver serial_txx9_reg = { .owner =THIS_MODULE , .driver_name ="serial_txx9" , - .devfs_name =TXX9_TTY_DEVFS_NAME , .dev_name =TXX9_TTY_NAME , .major =TXX9_TTY_MAJOR , .minor =TXX9_TTY_MINOR_START ,
drivers/serial/sh-sci.c +0 -3
@@ -1632,9 +1632,6 @@static struct uart_driver sci_uart_driver = { .owner =THIS_MODULE , .driver_name ="sci" , -#ifdef CONFIG_DEVFS_FS - .devfs_name ="ttsc/" , -#endif .dev_name ="ttySC" , .major =SCI_MAJOR , .minor =SCI_MINOR_START ,
drivers/serial/sunsab.c +0 -1
@@ -877,7 +877,6 @@static struct uart_driver sunsab_reg = { .owner =THIS_MODULE , .driver_name ="serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , };
drivers/serial/sunzilog.c +0 -1
@@ -1035,7 +1035,6 @@static struct uart_driver sunzilog_reg = { .owner =THIS_MODULE , .driver_name ="ttyS" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , };
drivers/serial/v850e_uart.c +0 -1
@@ -468,7 +468,6 @@static struct uart_driver v850e_uart_driver = { .owner =THIS_MODULE , .driver_name ="v850e_uart" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =V850E_UART_MINOR_BASE ,
drivers/serial/vr41xx_siu.c +0 -1
@@ -918,7 +918,6 @@ .owner = THIS_MODULE, .driver_name = "SIU", .dev_name = "ttyVR", - .devfs_name = "ttvr/", .major = SIU_MAJOR, .minor = SIU_MINOR_BASE, .cons = SERIAL_VR41XX_CONSOLE,
drivers/serial/8250.c +0 -1
@@ -2237,7 +2237,6 @@static struct uart_driver serial8250_reg = { .owner =THIS_MODULE , .driver_name ="serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =64 ,
drivers/serial/au1x00_uart.c +0 -1
@@ -1236,7 +1236,6 @@static struct uart_driver serial8250_reg = { .owner =THIS_MODULE , .driver_name ="serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , .minor =64 ,
drivers/serial/pmac_zilog.c +0 -1
@@ -101,7 +101,6 @@static struct uart_driver pmz_uart_reg = { .owner =THIS_MODULE , .driver_name ="ttyS" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , };
drivers/serial/sa1100.c +0 -1
@@ -827,7 +827,6 @@ .owner = THIS_MODULE, .driver_name = "ttySA", .dev_name = "ttySA", - .devfs_name = "ttySA", .major = SERIAL_SA1100_MAJOR, .minor = MINOR_START, .nr = NR_PORTS,
drivers/serial/sunsu.c +0 -1
@@ -1278,7 +1278,6 @@static struct uart_driver sunsu_reg = { .owner =THIS_MODULE , .driver_name ="serial" , - .devfs_name ="tts/" , .dev_name ="ttyS" , .major =TTY_MAJOR , };
PATCH 1/1 Remove the videodevice devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- drivers/media/video/videodev.c | 3 +-- include/linux/videodev.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/media/video/videodev.c +1 -2
@@ -336,8 +336,7 @@ vfd->class_dev.dev = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.devt =MKDEV (VIDEO_MAJOR , vfd->minor); -sprintf (vfd->devfs_name,"%s%d" , name_base, i - base); -strlcpy (vfd->class_dev.class_id, vfd->devfs_name,BUS_ID_SIZE ); +sprintf (vfd->class_dev.class_id,"%s%d" , name_base, i - base);class_device_register (&vfd->class_dev);class_device_create_file (&vfd->class_dev, &class_device_attr_name);
include/linux/videodev.h +0 -1
@@ -42,7 +42,6 @@/* for videodev.c intenal usage -- please don't touch */ int users;/* video_exclusive_{open|close} ... */ struct semaphore lock;/* ... helper function uses these */ -char devfs_name[64 ];/* devfs */ struct class_device class_dev;/* sysfs */ };
PATCH 1/1 Remove the ide drive devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- drivers/ide/ide-disk.c | 1 - drivers/ide/ide-probe.c | 8 -------- drivers/ide/ide.c | 5 +---- include/linux/ide.h | 1 - 4 files changed, 1 insertion(+), 14 deletions(-)
include/linux/ide.h +0 -1
@@ -668,7 +668,6 @@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 *) */
drivers/ide/ide-disk.c +0 -1
@@ -1048,7 +1048,6 @@struct gendisk *g = idkp->disk; drive->driver_data =NULL ; - drive->devfs_name[0 ] ='\0' ; g->private_data =NULL ;put_disk (g);kfree (idkp);
drivers/ide/ide-probe.c +0 -8
@@ -1307,8 +1307,6 @@ide_drive_t *drive =container_of (dev, ide_drive_t, gendev);spin_lock_irq (&ide_lock); -if (drive->devfs_name[0 ] !='\0' ) - drive->devfs_name[0 ] ='\0' ;ide_remove_drive_from_hwgroup (drive);if (drive->id !=NULL ) {kfree (drive->id);
@@ -1344,12 +1342,6 @@ drive->gendev.bus = &ide_bus_type; drive->gendev.driver_data = drive; drive->gendev.release = drive_release_dev; -if (drive->present) { -sprintf (drive->devfs_name,"ide/host%d/bus%d/target%d/lun%d" , - (hwif->channel && hwif->mate) ? - hwif->mate->index : hwif->index, - hwif->channel, unit, drive->lun); - } }blk_register_region (MKDEV (hwif->major,0 ),MAX_DRIVES <<PARTN_BITS ,THIS_MODULE , ata_probe, ata_lock, hwif);
drivers/ide/ide.c +1 -4
@@ -592,11 +592,8 @@ goto abort;for (unit =0 ; unit <MAX_DRIVES ; ++unit) { drive = &hwif->drives[unit]; -if (!drive->present) { -if (drive->devfs_name[0 ] !='\0' ) - drive->devfs_name[0 ] ='\0' ; +if (!drive->present)continue ; - }spin_unlock_irq (&ide_lock);device_unregister (&drive->gendev);down (&drive->gendev_rel_sem);
PATCH 1/1 Remove the line_driver devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- arch/um/drivers/line.c | 1 - arch/um/drivers/ssl.c | 1 - arch/um/drivers/stdio_console.c | 1 - arch/um/include/line.h | 1 - 4 files changed, 4 deletions(-)
arch/um/drivers/line.c +0 -1
@@ -624,7 +624,6 @@ driver->driver_name = line_driver->name; driver->name = line_driver->device_name; - driver->devfs_name = line_driver->devfs_name; driver->major = line_driver->major; driver->minor_start = line_driver->minor_start; driver->type = line_driver->type;
arch/um/drivers/ssl.c +0 -1
@@ -54,7 +54,6 @@static struct line_driver driver = { .name ="UML serial line" , .device_name ="ttyS" , - .devfs_name ="tts/" , .major =TTY_MAJOR , .minor_start =64 , .type =TTY_DRIVER_TYPE_SERIAL ,
arch/um/drivers/stdio_console.c +0 -1
@@ -60,7 +60,6 @@static struct line_driver driver = { .name ="UML console" , .device_name ="tty" , - .devfs_name ="vc/" , .major =TTY_MAJOR , .minor_start =0 , .type =TTY_DRIVER_TYPE_CONSOLE ,
arch/um/include/line.h +0 -1
@@ -17,7 +17,6 @@struct line_driver {char *name;char *device_name; -char *devfs_name;short major;short minor_start;short type;
PATCH 1/1 Remove the scsi_disk devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- drivers/scsi/scsi_scan.c | 6 +----- include/scsi/scsi_device.h | 1 - 2 files changed, 1 insertion(+), 6 deletions(-)
drivers/scsi/scsi_scan.c +1 -5
@@ -666,12 +666,8 @@if (inq_result[7 ] &0x10 ) sdev->sdtr =1 ; -sprintf (sdev->devfs_name,"scsi/host%d/bus%d/target%d/lun%d" , - sdev->host->host_no, sdev->channel, - sdev->id, sdev->lun); -/* -* End driverfs/devfs code. +* End driverfs code. */ if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) &&
include/scsi/scsi_device.h +0 -1
@@ -64,7 +64,6 @@unsigned sector_size;/* size in bytes */ void *hostdata;/* available to low-level driver */ -char devfs_name[256 ];/* devfs junk */ char type;char scsi_level;char inq_periph_qual;/* PQ from INQUIRY data */
PATCH 1/1 Remove the tty_driver devfs_name field as it's no longer needed
Also fixes all drivers that set this field.
--- drivers/char/cyclades.c | 1 - drivers/char/epca.c | 1 - drivers/char/esp.c | 1 - drivers/char/hvc_console.c | 1 - drivers/char/hvcs.c | 1 - drivers/char/hvsi.c | 1 - drivers/char/ip2main.c | 1 - drivers/char/isicom.c | 1 - drivers/char/moxa.c | 1 - drivers/char/pty.c | 2 -- drivers/char/riscom8.c | 1 - drivers/char/rocket.c | 1 - drivers/char/serial167.c | 1 - drivers/char/stallion.c | 1 - drivers/char/viocons.c | 1 - drivers/char/vme_scc.c | 1 - drivers/char/vt.c | 1 - drivers/isdn/capi/capi.c | 1 - drivers/isdn/i4l/isdn_tty.c | 1 - drivers/macintosh/macserial.c | 1 - drivers/s390/char/tty3270.c | 1 - drivers/s390/net/ctctty.c | 1 - drivers/tc/zs.c | 1 - drivers/usb/class/bluetty.c | 5 ++--- drivers/usb/class/cdc-acm.c | 1 - drivers/usb/gadget/serial.c | 1 - drivers/usb/serial/usb-serial.c | 1 - include/linux/tty_driver.h | 1 - net/bluetooth/rfcomm/tty.c | 1 - net/irda/ircomm/ircomm_tty.c | 1 - 30 files changed, 2 insertions(+), 33 deletions(-)
drivers/char/cyclades.c +0 -1
@@ -5286,7 +5286,6 @@ cy_serial_driver->owner =THIS_MODULE ; cy_serial_driver->driver_name ="cyclades" ; cy_serial_driver->name ="ttyC" ; - cy_serial_driver->devfs_name ="tts/C" ; cy_serial_driver->major =CYCLADES_MAJOR ; cy_serial_driver->minor_start =0 ; cy_serial_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/epca.c +0 -1
@@ -1471,7 +1471,6 @@ pc_driver->owner =THIS_MODULE ; pc_driver->name ="ttyD" ; - pc_driver->devfs_name ="tts/D" ; pc_driver->major =DIGI_MAJOR ; pc_driver->minor_start =0 ; pc_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/esp.c +0 -1
@@ -2478,7 +2478,6 @@ esp_driver->owner =THIS_MODULE ; esp_driver->name ="ttyP" ; - esp_driver->devfs_name ="tts/P" ; esp_driver->major =ESP_IN_MAJOR ; esp_driver->minor_start =0 ; esp_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/hvc_console.c +0 -1
@@ -694,7 +694,6 @@return -ENOMEM ; hvc_driver->owner =THIS_MODULE ; - hvc_driver->devfs_name ="hvc/" ; hvc_driver->driver_name ="hvc" ; hvc_driver->name ="hvc" ; hvc_driver->major =HVC_MAJOR ;
drivers/char/hvsi.c +0 -1
@@ -1156,7 +1156,6 @@return -ENOMEM ; hvsi_driver->owner =THIS_MODULE ; - hvsi_driver->devfs_name ="hvsi/" ; hvsi_driver->driver_name ="hvsi" ; hvsi_driver->name ="hvsi" ; hvsi_driver->major =HVSI_MAJOR ;
drivers/char/isicom.c +0 -1
@@ -1814,7 +1814,6 @@ isicom_normal->owner =THIS_MODULE ; isicom_normal->name ="ttyM" ; - isicom_normal->devfs_name ="isicom/" ; isicom_normal->major =ISICOM_NMAJOR ; isicom_normal->minor_start =0 ; isicom_normal->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/moxa.c +0 -1
@@ -340,7 +340,6 @@init_MUTEX (&moxaBuffSem); moxaDriver->owner =THIS_MODULE ; moxaDriver->name ="ttya" ; - moxaDriver->devfs_name ="tts/a" ; moxaDriver->major = ttymajor; moxaDriver->minor_start =0 ; moxaDriver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/pty.c +0 -2
@@ -265,7 +265,6 @@ pty_driver->owner =THIS_MODULE ; pty_driver->driver_name ="pty_master" ; pty_driver->name ="pty" ; - pty_driver->devfs_name ="pty/m" ; pty_driver->major =PTY_MASTER_MAJOR ; pty_driver->minor_start =0 ; pty_driver->type =TTY_DRIVER_TYPE_PTY ;
@@ -283,7 +282,6 @@ pty_slave_driver->owner =THIS_MODULE ; pty_slave_driver->driver_name ="pty_slave" ; pty_slave_driver->name ="ttyp" ; - pty_slave_driver->devfs_name ="pty/s" ; pty_slave_driver->major =PTY_SLAVE_MAJOR ; pty_slave_driver->minor_start =0 ; pty_slave_driver->type =TTY_DRIVER_TYPE_PTY ;
drivers/char/riscom8.c +0 -1
@@ -1648,7 +1648,6 @@memset (IRQ_to_board,0 ,sizeof (IRQ_to_board)); riscom_driver->owner =THIS_MODULE ; riscom_driver->name ="ttyL" ; - riscom_driver->devfs_name ="tts/L" ; riscom_driver->major =RISCOM8_NORMAL_MAJOR ; riscom_driver->type =TTY_DRIVER_TYPE_SERIAL ; riscom_driver->subtype =SERIAL_TYPE_NORMAL ;
drivers/char/rocket.c +0 -1
@@ -2367,7 +2367,6 @@ rocket_driver->owner =THIS_MODULE ; rocket_driver->flags =TTY_DRIVER_NO_DEVFS ; - rocket_driver->devfs_name ="tts/R" ; rocket_driver->name ="ttyR" ; rocket_driver->driver_name ="Comtrol RocketPort" ; rocket_driver->major =TTY_ROCKET_MAJOR ;
drivers/char/serial167.c +0 -1
@@ -2251,7 +2251,6 @@/* Initialize the tty_driver structure */ cy_serial_driver->owner =THIS_MODULE ; - cy_serial_driver->devfs_name ="tts/" ; cy_serial_driver->name ="ttyS" ; cy_serial_driver->major =TTY_MAJOR ; cy_serial_driver->minor_start =64 ;
drivers/char/stallion.c +0 -1
@@ -3092,7 +3092,6 @@ stl_serial->owner =THIS_MODULE ; stl_serial->driver_name = stl_drvname; stl_serial->name ="ttyE" ; - stl_serial->devfs_name ="tts/E" ; stl_serial->major =STL_SERIALMAJOR ; stl_serial->minor_start =0 ; stl_serial->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/viocons.c +0 -1
@@ -1154,7 +1154,6 @@ viotty_driver =alloc_tty_driver (VTTY_PORTS ); viotty_driver->owner =THIS_MODULE ; viotty_driver->driver_name ="vioconsole" ; - viotty_driver->devfs_name ="vcs/" ; viotty_driver->name ="tty" ; viotty_driver->name_base =1 ; viotty_driver->major =TTY_MAJOR ;
drivers/char/vme_scc.c +0 -1
@@ -147,7 +147,6 @@ scc_driver->owner =THIS_MODULE ; scc_driver->driver_name ="scc" ; scc_driver->name ="ttyS" ; - scc_driver->devfs_name ="tts/" ; scc_driver->major =TTY_MAJOR ; scc_driver->minor_start =SCC_MINOR_BASE ; scc_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/char/vt.c +0 -1
@@ -2592,7 +2592,6 @@if (!console_driver)panic ("Couldn't allocate console driver\n" ); console_driver->owner =THIS_MODULE ; - console_driver->devfs_name ="vc/" ; console_driver->name ="tty" ; console_driver->name_base =1 ; console_driver->major =TTY_MAJOR ;
include/linux/tty_driver.h +0 -1
@@ -157,7 +157,6 @@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 */
drivers/char/hvcs.c +0 -1
@@ -1363,7 +1363,6 @@ hvcs_tty_driver->driver_name = hvcs_driver_name; hvcs_tty_driver->name = hvcs_device_node; - hvcs_tty_driver->devfs_name = hvcs_device_node;/* * We'll let the system assign us a major number, indicated by leaving
drivers/char/ip2main.c +0 -1
@@ -672,7 +672,6 @@ ip2_tty_driver->owner =THIS_MODULE ; ip2_tty_driver->name ="ttyF" ; - ip2_tty_driver->devfs_name ="tts/F" ; ip2_tty_driver->driver_name = pcDriver_name; ip2_tty_driver->major =IP2_TTY_MAJOR ; ip2_tty_driver->minor_start =0 ;
drivers/isdn/capi/capi.c +0 -1
@@ -1327,7 +1327,6 @@ drv->owner =THIS_MODULE ; drv->driver_name ="capi_nc" ; - drv->devfs_name ="capi/" ; drv->name ="capi" ; drv->major = capi_ttymajor; drv->minor_start =0 ;
drivers/isdn/i4l/isdn_tty.c +0 -1
@@ -1901,7 +1901,6 @@if (!m->tty_modem)return -ENOMEM ; m->tty_modem->name ="ttyI" ; - m->tty_modem->devfs_name ="isdn/ttyI" ; m->tty_modem->major =ISDN_TTY_MAJOR ; m->tty_modem->minor_start =0 ; m->tty_modem->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/macintosh/macserial.c +0 -1
@@ -2521,7 +2521,6 @@ serial_driver->owner =THIS_MODULE ; serial_driver->driver_name ="macserial" ; - serial_driver->devfs_name ="tts/" ; serial_driver->name ="ttyS" ; serial_driver->major =TTY_MAJOR ; serial_driver->minor_start =64 ;
drivers/s390/char/tty3270.c +0 -1
@@ -1790,7 +1790,6 @@* proc_entry, set_termios, flush_buffer, set_ldisc, write_proc */ driver->owner =THIS_MODULE ; - driver->devfs_name ="ttyTUB/" ; driver->driver_name ="ttyTUB" ; driver->name ="ttyTUB" ; driver->major =IBM_TTY3270_MAJOR ;
drivers/s390/net/ctctty.c +0 -1
@@ -1150,7 +1150,6 @@return -ENOMEM ; } - device->devfs_name ="ctc/" CTC_TTY_NAME ; device->name =CTC_TTY_NAME ; device->major =CTC_TTY_MAJOR ; device->minor_start =0 ;
drivers/tc/zs.c +0 -1
@@ -1785,7 +1785,6 @@/* Not all of this is exactly right for us. */ serial_driver->owner =THIS_MODULE ; - serial_driver->devfs_name ="tts/" ; serial_driver->name ="ttyS" ; serial_driver->major =TTY_MAJOR ; serial_driver->minor_start =64 ;
drivers/usb/class/bluetty.c +2 -3
@@ -1118,9 +1118,9 @@ bluetooth->interrupt_in_buffer, buffer_size, bluetooth_int_callback, bluetooth, endpoint->bInterval); -/* initialize the devfs nodes for this device and let the user know what bluetooths we are bound to */ +/* register the tty device and let the user know what bluetooths we are bound to */ tty_register_device (bluetooth_tty_driver, minor, &intf->dev); -info ("Bluetooth converter now attached to ttyUB%d (or usb/ttub/%d for devfs)" , minor, minor); +info ("Bluetooth converter now attached to ttyUB%d" , minor); bluetooth_table[minor] = bluetooth;
@@ -1231,7 +1231,6 @@ bluetooth_tty_driver->owner =THIS_MODULE ; bluetooth_tty_driver->driver_name ="usb-bluetooth" ; bluetooth_tty_driver->name ="ttyUB" ; - bluetooth_tty_driver->devfs_name ="usb/ttub/" ; bluetooth_tty_driver->major =BLUETOOTH_TTY_MAJOR ; bluetooth_tty_driver->minor_start =0 ; bluetooth_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/usb/class/cdc-acm.c +0 -1
@@ -1040,7 +1040,6 @@ acm_tty_driver->owner =THIS_MODULE , acm_tty_driver->driver_name ="acm" , acm_tty_driver->name ="ttyACM" , - acm_tty_driver->devfs_name ="usb/acm/" , acm_tty_driver->major =ACM_TTY_MAJOR , acm_tty_driver->minor_start =0 , acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL,
drivers/usb/gadget/serial.c +0 -1
@@ -663,7 +663,6 @@ gs_tty_driver->owner =THIS_MODULE ; gs_tty_driver->driver_name =GS_SHORT_NAME ; gs_tty_driver->name ="ttygs" ; - gs_tty_driver->devfs_name ="usb/ttygs/" ; gs_tty_driver->major =GS_MAJOR ; gs_tty_driver->minor_start =GS_MINOR_START ; gs_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ;
drivers/usb/serial/usb-serial.c +0 -1
@@ -1300,7 +1300,6 @@ usb_serial_tty_driver->owner =THIS_MODULE ; usb_serial_tty_driver->driver_name ="usbserial" ; - usb_serial_tty_driver->devfs_name ="usb/tts/" ; usb_serial_tty_driver->name ="ttyUSB" ; usb_serial_tty_driver->major =SERIAL_TTY_MAJOR ; usb_serial_tty_driver->minor_start =0 ;
net/bluetooth/rfcomm/tty.c +0 -1
@@ -901,7 +901,6 @@ rfcomm_tty_driver->owner =THIS_MODULE ; rfcomm_tty_driver->driver_name ="rfcomm" ; - rfcomm_tty_driver->devfs_name ="bluetooth/rfcomm/" ; rfcomm_tty_driver->name ="rfcomm" ; rfcomm_tty_driver->major =RFCOMM_TTY_MAJOR ; rfcomm_tty_driver->minor_start =RFCOMM_TTY_MINOR ;
net/irda/ircomm/ircomm_tty.c +0 -1
@@ -124,7 +124,6 @@ driver->owner =THIS_MODULE ; driver->driver_name ="ircomm" ; driver->name ="ircomm" ; - driver->devfs_name ="ircomm" ; driver->major =IRCOMM_TTY_MAJOR ; driver->minor_start =IRCOMM_TTY_MINOR ; driver->type =TTY_DRIVER_TYPE_SERIAL ;
PATCH 1/1 Remove the mode field from usb_class_driver as it's no longer needed
Also fixes all drivers that set this field, and removes some other devfs specfic USB logic.
--- drivers/usb/class/usblp.c | 3 +-- drivers/usb/core/file.c | 12 ++++-------- drivers/usb/image/mdc800.c | 3 +-- drivers/usb/input/aiptek.c | 2 +- drivers/usb/input/hiddev.c | 3 +-- drivers/usb/media/dabusb.c | 3 +-- drivers/usb/misc/auerswald.c | 3 +-- drivers/usb/misc/idmouse.c | 5 ++--- drivers/usb/misc/legousbtower.c | 5 ++--- drivers/usb/misc/rio500.c | 3 +-- drivers/usb/misc/sisusbvga/sisusb.c | 3 +-- drivers/usb/misc/usblcd.c | 9 ++++----- drivers/usb/usb-skeleton.c | 3 +-- include/linux/usb.h | 7 ++----- 14 files changed, 23 insertions(+), 41 deletions(-)
include/linux/usb.h +2 -5
@@ -570,10 +570,8 @@/** * struct usb_class_driver - identifies a USB driver that wants to use the USB major number -* @name: devfs name for this driver. Will also be used by the driver -* class code to create a usb class device. +* @name: the usb class device name for this driver. Will show up in sysfs. * @fops: pointer to the struct file_operations of this driver. -* @mode: the mode for the devfs file to be created for this driver. * @minor_base: the start of the minor range for this driver. * * This structure is used for the usb_register_dev() and
@@ -583,8 +581,7 @@struct usb_class_driver {char *name;struct file_operations *fops; -mode_t mode; -int minor_base; +int minor_base; };/*
drivers/usb/class/usblp.c +1 -2
@@ -841,9 +841,8 @@ };static struct usb_class_driver usblp_class = { - .name ="usb/lp%d" , + .name ="lp%d" , .fops = &usblp_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP , .minor_base =USBLP_MINOR_BASE , };
drivers/usb/core/file.c +4 -8
@@ -108,8 +108,7 @@* enabled, the minor number will be based on the next available free minor, * starting at the class_driver->minor_base. * -* This function also creates the devfs file for the usb device, if devfs -* is enabled, and creates a usb class device in the sysfs tree. +* This function also creates a usb class device in the sysfs tree. * * usb_deregister_dev() must be called when the driver is done with * the minor numbers given out by this function.
@@ -158,10 +157,8 @@ intf->minor = minor; -/* handle the devfs registration */ -snprintf (name,BUS_ID_SIZE , class_driver->name, minor - minor_base); -/* create a usb class device for this usb interface */ +snprintf (name,BUS_ID_SIZE , class_driver->name, minor - minor_base); temp =strrchr (name,'/' );if (temp && (temp[1 ] !=0x00 )) ++temp;
@@ -189,9 +186,8 @@* call to usb_register_dev() (usually when the device is disconnected * from the system.) * -* This function also cleans up the devfs file for the usb device, if devfs -* is enabled, and removes the usb class device from the sysfs tree. -* +* This function also removes the usb class device from the sysfs tree. +* * This should be called by all drivers that use the USB major number. */ void usb_deregister_dev(struct usb_interface *intf,
drivers/usb/image/mdc800.c +1 -2
@@ -425,9 +425,8 @@static struct usb_driver mdc800_usb_driver;static struct file_operations mdc800_device_ops;static struct usb_class_driver mdc800_class = { - .name ="usb/mdc800%d" , + .name ="mdc800%d" , .fops = &mdc800_device_ops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP , .minor_base =MDC800_DEVICE_MINOR_BASE , };
drivers/usb/input/hiddev.c +1 -2
@@ -730,9 +730,8 @@ };static struct usb_class_driver hiddev_class = { - .name ="usb/hid/hiddev%d" , + .name ="hiddev%d" , .fops = &hiddev_fops, - .mode =S_IFCHR |S_IRUGO |S_IWUSR , .minor_base =HIDDEV_MINOR_BASE , };
drivers/usb/media/dabusb.c +1 -2
@@ -707,9 +707,8 @@ };static struct usb_class_driver dabusb_class = { - .name ="usb/dabusb%d" , + .name ="dabusb%d" , .fops = &dabusb_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP , .minor_base =DABUSB_MINOR , };
drivers/usb/misc/auerswald.c +1 -2
@@ -1874,9 +1874,8 @@ };static struct usb_class_driver auerswald_class = { - .name ="usb/auer%d" , + .name ="auer%d" , .fops = &auerswald_fops, - .mode =S_IFCHR |S_IRUGO |S_IWUGO , .minor_base =AUER_MINOR_BASE , };
drivers/usb/misc/idmouse.c +2 -3
@@ -105,11 +105,10 @@ .release = idmouse_release, }; -/* class driver information for devfs */ +/* class driver information */ static struct usb_class_driver idmouse_class = { - .name ="usb/idmouse%d" , + .name ="idmouse%d" , .fops = &idmouse_fops, - .mode =S_IFCHR |S_IRUSR |S_IRGRP |S_IROTH ,/* filemode (char, 444) */ .minor_base =USB_IDMOUSE_MINOR_BASE , };
drivers/usb/misc/legousbtower.c +2 -3
@@ -271,12 +271,11 @@/* * usb class driver info in order to get a minor number from the usb core, -* and to have the device registered with devfs and the driver core +* and to have the device registered with the driver core */ static struct usb_class_driver tower_class = { - .name ="usb/legousbtower%d" , + .name ="legousbtower%d" , .fops = &tower_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP |S_IROTH , .minor_base =LEGO_USB_TOWER_MINOR_BASE , };
drivers/usb/misc/rio500.c +1 -2
@@ -443,9 +443,8 @@ };static struct usb_class_driver usb_rio_class = { - .name ="usb/rio500%d" , + .name ="rio500%d" , .fops = &usb_rio_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP , .minor_base =RIO_MINOR , };
drivers/usb/misc/usblcd.c +4 -5
@@ -251,13 +251,12 @@ };/* -* * usb class driver info in order to get a minor number from the usb core, -* * and to have the device registered with devfs and the driver core -* */ +* usb class driver info in order to get a minor number from the usb core, +* and to have the device registered with the driver core +*/ static struct usb_class_driver lcd_class = { - .name ="usb/lcd%d" , + .name ="lcd%d" , .fops = &lcd_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP |S_IROTH , .minor_base =USBLCD_MINOR , };
drivers/usb/usb-skeleton.c +1 -2
@@ -223,9 +223,8 @@* and to have the device registered with devfs and the driver core */ static struct usb_class_driver skel_class = { - .name ="usb/skel%d" , + .name ="skel%d" , .fops = &skel_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP |S_IROTH , .minor_base =USB_SKEL_MINOR_BASE , };
drivers/usb/misc/sisusbvga/sisusb.c +1 -2
@@ -2895,9 +2895,8 @@ };static struct usb_class_driver usb_sisusb_class = { - .name ="usb/sisusbvga%d" , + .name ="sisusbvga%d" , .fops = &usb_sisusb_fops, - .mode =S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP , .minor_base =SISUSB_MINOR };
drivers/usb/input/aiptek.c +1 -1
@@ -2170,7 +2170,7 @@* input_handles associated with this input device. * What identifies an evdev input_handler is that it begins * with 'event', continues with a digit, and that in turn -* is mapped to /{devfs}/input/eventN. +* is mapped to input/eventN. */ inputdev = &aiptek->inputdev;list_for_each_safe (node, next, &inputdev->h_list) {
PATCH 1/1 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.
--- arch/ppc/4xx_io/serial_sicc.c | 2 +- drivers/char/ip2main.c | 2 +- drivers/char/pty.c | 4 ++-- drivers/char/rocket.c | 4 ++-- drivers/char/tty_io.c | 8 ++++---- drivers/isdn/i4l/isdn_tty.c | 2 +- drivers/s390/char/tty3270.c | 2 +- drivers/serial/crisv10.c | 2 +- drivers/serial/serial_core.c | 2 +- drivers/tc/zs.c | 2 +- drivers/usb/class/bluetty.c | 2 +- drivers/usb/class/cdc-acm.c | 2 +- drivers/usb/gadget/serial.c | 2 +- drivers/usb/serial/usb-serial.c | 2 +- include/linux/tty_driver.h | 13 ++++++++++--- net/bluetooth/rfcomm/tty.c | 2 +- 16 files changed, 30 insertions(+), 23 deletions(-)
drivers/char/tty_io.c +4 -4
@@ -2664,8 +2664,8 @@* tty device it can be set to NULL safely. * * This call is required to be made to register an individual tty device if -* the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that -* bit is not set, this function should not be called. +* the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set. If that +* bit is not set, this function should not be called by a tty driver. */ void tty_register_device (struct tty_driver *driver,unsigned index,struct device *device)
@@ -2817,7 +2817,7 @@list_add (&driver->tty_drivers, &tty_drivers); -if ( !(driver->flags &TTY_DRIVER_NO_DEVFS ) ) { +if ( !(driver->flags &TTY_DRIVER_DYNAMIC_DEV ) ) {for (i =0 ; i < driver->num; i++)tty_register_device (driver, i,NULL ); }
@@ -2860,7 +2860,7 @@ driver->termios_locked[i] =NULL ;kfree (tp); } -if (!(driver->flags &TTY_DRIVER_NO_DEVFS )) +if (!(driver->flags &TTY_DRIVER_DYNAMIC_DEV ))tty_unregister_device (driver, i); } p = driver->ttys;
include/linux/tty_driver.h +10 -3
@@ -241,8 +241,15 @@* 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 @@#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 */
drivers/char/ip2main.c +1 -1
@@ -679,7 +679,7 @@ ip2_tty_driver->subtype =SERIAL_TYPE_NORMAL ; ip2_tty_driver->init_termios = tty_std_termios; ip2_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ; - ip2_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + ip2_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ;tty_set_operations (ip2_tty_driver, &ip2_ops);ip2trace (ITRC_NO_PORT ,ITRC_INIT ,3 ,0 );
drivers/char/pty.c +2 -2
@@ -369,7 +369,7 @@ ptm_driver->init_termios.c_cflag =B38400 |CS8 |CREAD ; ptm_driver->init_termios.c_lflag =0 ; ptm_driver->flags =TTY_DRIVER_RESET_TERMIOS |TTY_DRIVER_REAL_RAW | -TTY_DRIVER_NO_DEVFS |TTY_DRIVER_DEVPTS_MEM ; +TTY_DRIVER_DYNAMIC_DEV |TTY_DRIVER_DEVPTS_MEM ; ptm_driver->other = pts_driver;tty_set_operations (ptm_driver, &pty_ops); ptm_driver->ioctl = pty_unix98_ioctl;
@@ -384,7 +384,7 @@ pts_driver->init_termios = tty_std_termios; pts_driver->init_termios.c_cflag =B38400 |CS8 |CREAD ; pts_driver->flags =TTY_DRIVER_RESET_TERMIOS |TTY_DRIVER_REAL_RAW | -TTY_DRIVER_NO_DEVFS |TTY_DRIVER_DEVPTS_MEM ; +TTY_DRIVER_DYNAMIC_DEV |TTY_DRIVER_DEVPTS_MEM ; pts_driver->other = ptm_driver;tty_set_operations (pts_driver, &pty_ops);
drivers/char/rocket.c +2 -2
@@ -2366,7 +2366,7 @@*/ rocket_driver->owner =THIS_MODULE ; - rocket_driver->flags =TTY_DRIVER_NO_DEVFS ; + rocket_driver->flags =TTY_DRIVER_DYNAMIC_DEV ; rocket_driver->name ="ttyR" ; rocket_driver->driver_name ="Comtrol RocketPort" ; rocket_driver->major =TTY_ROCKET_MAJOR ;
@@ -2377,7 +2377,7 @@ rocket_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;#ifdef ROCKET_SOFT_FLOW - rocket_driver->flags |=TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + rocket_driver->flags |=TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ;#endif tty_set_operations (rocket_driver, &rocket_ops);
drivers/serial/serial_core.c +1 -1
@@ -2089,7 +2089,7 @@ normal->subtype =SERIAL_TYPE_NORMAL ; normal->init_termios = tty_std_termios; normal->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ; - normal->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + normal->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; normal->driver_state = drv;tty_set_operations (normal, &uart_ops);
arch/ppc/4xx_io/serial_sicc.c +1 -1
@@ -1764,7 +1764,7 @@ siccnormal_driver->subtype =SERIAL_TYPE_NORMAL ; siccnormal_driver->init_termios = tty_std_termios; siccnormal_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ; - siccnormal_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + siccnormal_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ;tty_set_operations (siccnormal_driver, &sicc_ops);if (tty_register_driver (siccnormal_driver))
drivers/isdn/i4l/isdn_tty.c +1 -1
@@ -1907,7 +1907,7 @@ m->tty_modem->subtype =SERIAL_TYPE_NORMAL ; m->tty_modem->init_termios = tty_std_termios; m->tty_modem->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ; - m->tty_modem->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + m->tty_modem->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; m->tty_modem->driver_name ="isdn_tty" ;tty_set_operations (m->tty_modem, &modem_ops); retval =tty_register_driver (m->tty_modem);
drivers/serial/crisv10.c +1 -1
@@ -4917,7 +4917,7 @@ driver->init_termios = tty_std_termios; driver->init_termios.c_cflag =B115200 |CS8 |CREAD |HUPCL |CLOCAL ;/* is normally B9600 default... */ - driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; driver->termios = serial_termios; driver->termios_locked = serial_termios_locked;
drivers/tc/zs.c +1 -1
@@ -1793,7 +1793,7 @@ serial_driver->init_termios = tty_std_termios; serial_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ; - serial_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + serial_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ;tty_set_operations (serial_driver, &serial_ops);if (tty_register_driver (serial_driver))
drivers/usb/class/bluetty.c +1 -1
@@ -1235,7 +1235,7 @@ bluetooth_tty_driver->minor_start =0 ; bluetooth_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ; bluetooth_tty_driver->subtype =SERIAL_TYPE_NORMAL ; - bluetooth_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + bluetooth_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; bluetooth_tty_driver->init_termios = tty_std_termios; bluetooth_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;tty_set_operations (bluetooth_tty_driver, &bluetooth_ops);
drivers/usb/class/cdc-acm.c +1 -1
@@ -1044,7 +1044,7 @@ acm_tty_driver->minor_start =0 , acm_tty_driver->type =TTY_DRIVER_TYPE_SERIAL , acm_tty_driver->subtype =SERIAL_TYPE_NORMAL , - acm_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS , + acm_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; acm_tty_driver->init_termios = tty_std_termios; acm_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;tty_set_operations (acm_tty_driver, &acm_ops);
drivers/usb/gadget/serial.c +1 -1
@@ -667,7 +667,7 @@ gs_tty_driver->minor_start =GS_MINOR_START ; gs_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ; gs_tty_driver->subtype =SERIAL_TYPE_NORMAL ; - gs_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + gs_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; gs_tty_driver->init_termios = tty_std_termios; gs_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;tty_set_operations (gs_tty_driver, &gs_tty_ops);
drivers/usb/serial/usb-serial.c +1 -1
@@ -1305,7 +1305,7 @@ usb_serial_tty_driver->minor_start =0 ; usb_serial_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ; usb_serial_tty_driver->subtype =SERIAL_TYPE_NORMAL ; - usb_serial_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + usb_serial_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; usb_serial_tty_driver->init_termios = tty_std_termios; usb_serial_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;tty_set_operations (usb_serial_tty_driver, &serial_ops);
net/bluetooth/rfcomm/tty.c +1 -1
@@ -906,7 +906,7 @@ rfcomm_tty_driver->minor_start =RFCOMM_TTY_MINOR ; rfcomm_tty_driver->type =TTY_DRIVER_TYPE_SERIAL ; rfcomm_tty_driver->subtype =SERIAL_TYPE_NORMAL ; - rfcomm_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_NO_DEVFS ; + rfcomm_tty_driver->flags =TTY_DRIVER_REAL_RAW |TTY_DRIVER_DYNAMIC_DEV ; rfcomm_tty_driver->init_termios = tty_std_termios; rfcomm_tty_driver->init_termios.c_cflag =B9600 |CS8 |CREAD |HUPCL |CLOCAL ;tty_set_operations (rfcomm_tty_driver, &rfcomm_ops);
drivers/s390/char/tty3270.c +1 -1
@@ -1796,7 +1796,7 @@ driver->type =TTY_DRIVER_TYPE_SYSTEM ; driver->subtype =SYSTEM_TYPE_TTY ; driver->init_termios = tty_std_termios; - driver->flags =TTY_DRIVER_RESET_TERMIOS |TTY_DRIVER_NO_DEVFS ; + driver->flags =TTY_DRIVER_RESET_TERMIOS |TTY_DRIVER_DYNAMIC_DEV ;tty_set_operations (driver, &tty3270_ops); ret =tty_register_driver (driver);if (ret) {
PATCH 1/1 Last little devfs cleanups throughout the kernel tree.
Just removes a few unused #defines and fixes some comments due to devfs now being gone.
--- drivers/block/viodasd.c | 1 - drivers/cdrom/viocd.c | 1 - drivers/md/dm.c | 2 +- drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 11 ----------- drivers/serial/dz.c | 4 ---- drivers/serial/serial_core.c | 2 +- drivers/usb/usb-skeleton.c | 4 ++-- 7 files changed, 4 insertions(+), 21 deletions(-)
drivers/block/viodasd.c +0 -1
@@ -59,7 +59,6 @@* numbers 0-255 we get a maximum of 32 disks. */ #define VIOD_GENHD_NAME "iseries/vd" -#define VIOD_GENHD_DEVFS_NAME "iseries/disc"#define VIOD_VERS "1.64"
drivers/cdrom/viocd.c +0 -1
@@ -51,7 +51,6 @@#include <asm/iSeries/vio.h> #define VIOCD_DEVICE "iseries/vcd" -#define VIOCD_DEVICE_DEVFS "iseries/vcd"#define VIOCD_VERS "1.06"
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +0 -11
@@ -123,10 +123,6 @@int revision; -#if 0 -devfs_handle_t stc_devfs_handle; -#endif -struct dvb_frontend * fe; };
@@ -1529,13 +1525,6 @@return -ENODEV ; } -#if 0 - ttusb->stc_devfs_handle = -devfs_register (ttusb->adapter->devfs_handle,TTUSB_BUDGET_NAME , -DEVFS_FL_DEFAULT ,0 ,192 , -S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP |S_IWGRP - |S_IROTH |S_IWOTH , &stc_fops, ttusb); -#endif usb_set_intfdata (intf, (void *) ttusb);frontend_init (ttusb);
drivers/serial/dz.c +0 -4
@@ -771,11 +771,7 @@static struct uart_driver dz_reg = { .owner =THIS_MODULE , .driver_name ="serial" , -#ifdef CONFIG_DEVFS - .dev_name ="tts/%d" , -#else .dev_name ="ttyS%d" , -#endif .major =TTY_MAJOR , .minor =64 , .nr =DZ_NB_PORT ,
drivers/md/dm.c +1 -1
@@ -150,7 +150,7 @@bioset_free (dm_set);if (unregister_blkdev (_major, _name) <0 ) -DMERR ("devfs_unregister_blkdev failed" ); +DMERR ("unregister_blkdev failed" ); _major =0 ;
drivers/serial/serial_core.c +1 -1
@@ -2218,7 +2218,7 @@down (&port_sem);/* -* Remove the devices from devfs +* Remove the devices from sysfs */ tty_unregister_device (drv->tty_driver, port->line);
drivers/usb/usb-skeleton.c +2 -2
@@ -218,9 +218,9 @@ .release = skel_release, }; -/* +/* * usb class driver info in order to get a minor number from the usb core, -* and to have the device registered with devfs and the driver core +* and to have the device registered with sysfs. */ static struct usb_class_driver skel_class = { .name ="skel%d" ,
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
In reply to Greg KHdrivers/block/acsi_slm.c line 3
Quoted 10 lines · Greg KH
...
drivers/block/acsi_slm.c +0
-2@@ -1,5 +1,3 @@ -/* -* acsi_slm.c -- Device driver for the Atari SLM laser printer * * Copyright 1995 Roman Hodek <[email protected]> *
This part of the patch seems to be an accident.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 13 lines · Adrian Bunk
drivers/block/acsi_slm.c line 3
Quoted 10 lines · Greg KH
...
drivers/block/acsi_slm.c +0
-2@@ -1,5 +1,3 @@ -/* -* acsi_slm.c -- Device driver for the Atari SLM laser printer * * Copyright 1995 Roman Hodek <[email protected]> * This part of the patch seems to be an accident.
Ah, good catch, it is. Thanks, I've fixed it up now.
greg k-h
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
In reply to Greg KHIt didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin
Quoted 1,068 lines · Greg KH
Removes the
devfs_mk_cdev()function and all callers of it.Signed-off-by Greg Kroah-Hartman <[email protected]>--- arch/sparc64/solaris/socksys.c | 2 - drivers/block/acsi_slm.c | 6 ---- drivers/block/paride/pg.c | 11 -------- drivers/block/paride/pt.c | 16 ----------- drivers/char/dsp56k.c | 8 ----- drivers/char/dtlk.c | 3 -- drivers/char/ftape/zftape/zftape-init.c | 18 ------------- drivers/char/ip2main.c | 17 ------------ drivers/char/ipmi/ipmi_devintf.c | 3 -- drivers/char/istallion.c | 6 ---- drivers/char/lp.c | 2 - drivers/char/mem.c | 7 +---- drivers/char/misc.c | 9 ------ drivers/char/ppdev.c | 4 -- drivers/char/raw.c | 8 ----- drivers/char/stallion.c | 6 ---- drivers/char/tipar.c | 10 ------- drivers/char/tty_io.c | 7 ----- drivers/char/vc_screen.c | 8 ----- drivers/char/viotape.c | 4 -- drivers/i2c/i2c-dev.c | 2 - drivers/ide/ide-tape.c | 7 ----- drivers/ieee1394/amdtp.c | 3 -- drivers/ieee1394/dv1394.c | 12 -------- drivers/ieee1394/raw1394.c | 4 -- drivers/ieee1394/video1394.c | 3 -- drivers/input/evdev.c | 2 - drivers/input/joydev.c | 2 - drivers/input/mousedev.c | 4 -- drivers/input/tsdev.c | 4 -- drivers/isdn/capi/capi.c | 2 - drivers/isdn/hardware/eicon/divamnt.c | 1 drivers/isdn/hardware/eicon/divasi.c | 1 drivers/isdn/hardware/eicon/divasmain.c | 1 drivers/macintosh/adb.c | 2 - drivers/media/dvb/dvb-core/dvbdev.c | 4 -- drivers/media/video/videodev.c | 6 +--- drivers/mtd/mtdchar.c | 44 -------------------------------- drivers/net/ppp_generic.c | 7 ----- drivers/net/wan/cosa.c | 7 ----- drivers/sbus/char/bpp.c | 4 -- drivers/sbus/char/vfc_dev.c | 4 -- drivers/scsi/osst.c | 13 --------- drivers/scsi/sg.c | 3 -- drivers/scsi/st.c | 13 --------- drivers/telephony/phonedev.c | 2 - drivers/usb/core/file.c | 1 drivers/video/fbmem.c | 2 - fs/coda/psdev.c | 11 -------- include/linux/devfs_fs_kernel.h | 4 -- sound/core/sound.c | 10 ------- sound/oss/soundcard.c | 10 ------- sound/sound_core.c | 2 - 53 files changed, 11 insertions(+), 341 deletions(-)drivers/block/acsi_slm.c +0
-6@@ -1,5 +1,3 @@ -/* -* acsi_slm.c -- Device driver for the Atari SLM laser printer * * Copyright 1995 Roman Hodek <[email protected]> * @@ -1007,10 +1005,6 @@ BufferP = SLMBuffer; SLMState =IDLE ; -for (i =0 ; i <MAX_SLM ; i++) { -devfs_mk_cdev (MKDEV (ACSI_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR ,"slm/%d" , i); - }return 0 ; }drivers/block/paride/pg.c +1
-10@@ -673,22 +673,13 @@ }for (unit =0 ; unit <PG_UNITS ; unit++) {struct pg *dev = &devices[unit]; -if (dev->present) { +if (dev->present)class_device_create (pg_class,MKDEV (major, unit),NULL ,"pg%u" , unit); - err =devfs_mk_cdev (MKDEV (major, unit), -S_IFCHR |S_IRUSR |S_IWUSR ,"pg/%u" , - unit); -if (err) - goto out_class; - } } err =0 ; goto out; -out_class: -class_device_destroy (pg_class,MKDEV (major, unit)); -class_destroy (pg_class); out_chrdev:unregister_chrdev (major,"pg" ); out:drivers/block/paride/pt.c +0
-16@@ -973,27 +973,11 @@if (pt[unit].present) {class_device_create (pt_class,MKDEV (major, unit),NULL ,"pt%d" , unit); - err =devfs_mk_cdev (MKDEV (major, unit), -S_IFCHR |S_IRUSR |S_IWUSR , -"pt/%d" , unit); -if (err) { -class_device_destroy (pt_class,MKDEV (major, unit)); - goto out_class; - }class_device_create (pt_class,MKDEV (major, unit +128 ),NULL ,"pt%dn" , unit); - err =devfs_mk_cdev (MKDEV (major, unit +128 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"pt/%dn" , unit); -if (err) { -class_device_destroy (pt_class,MKDEV (major, unit +128 )); - goto out_class; - } } goto out; -out_class: -class_destroy (pt_class); out_chrdev:unregister_chrdev (major,"pt" ); out:drivers/ide/ide-tape.c +0
-7@@ -4878,13 +4878,6 @@idetape_setup (drive, tape, minor); -devfs_mk_cdev (MKDEV (HWIF (drive)->major, minor), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt" , drive->devfs_name); -devfs_mk_cdev (MKDEV (HWIF (drive)->major, minor +128 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mtn" , drive->devfs_name); - g->number =-1 ; g->fops = &idetape_block_ops;ide_register_region (g);drivers/ieee1394/amdtp.c +0
-3@@ -1238,9 +1238,6 @@INIT_LIST_HEAD (&ah->stream_list);spin_lock_init (&ah->stream_list_lock); - -devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , minor), -S_IFCHR |S_IRUSR |S_IWUSR ,"amdtp/%d" , ah->host->id); }static void amdtp_remove_host (struct hpsb_host *host)drivers/ieee1394/dv1394.c +0
-12@@ -2278,21 +2278,9 @@list_add_tail (&video->list, &dv1394_cards);spin_unlock_irqrestore (&dv1394_cards_lock, flags); -if (devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , -IEEE1394_MINOR_BLOCK_DV1394 *16 + video->id), -S_IFCHR |S_IRUGO |S_IWUGO , -"ieee1394/dv/host%d/%s/%s" , - (video->id>>2 ), - (video->pal_or_ntsc ==DV1394_NTSC ?"NTSC" :"PAL" ), - (video->mode ==MODE_RECEIVE ?"in" :"out" )) <0 ) - goto err_free; -debug_printk ("dv1394: dv1394_init() OK on ID %d\n" , video->id);return 0 ; - - err_free: -kfree (video); err:return -1 ; }drivers/ieee1394/raw1394.c +0
-4@@ -2907,10 +2907,6 @@ ret = -EFAULT ; goto out_unreg; } - -devfs_mk_cdev (MKDEV ( -IEEE1394_MAJOR ,IEEE1394_MINOR_BLOCK_RAW1394 *16 ), -S_IFCHR |S_IRUSR |S_IWUSR ,RAW1394_DEVICE_NAME );cdev_init (&raw1394_cdev, &raw1394_fops); raw1394_cdev.owner =THIS_MODULE ;drivers/ieee1394/video1394.c +0
-3@@ -1373,9 +1373,6 @@class_device_create (hpsb_protocol_class,MKDEV (IEEE1394_MAJOR , minor),NULL ,"%s-%d" ,VIDEO1394_DRIVER_NAME , ohci->host->id); -devfs_mk_cdev (MKDEV (IEEE1394_MAJOR , minor), -S_IFCHR |S_IRUSR |S_IWUSR , -"%s/%d" ,VIDEO1394_DRIVER_NAME , ohci->host->id); }drivers/input/evdev.c +0
-2@@ -429,8 +429,6 @@ evdev_table[minor] = evdev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,EVDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/event%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,EVDEV_MINOR_BASE + minor), dev->dev,"event%d" , minor);drivers/input/joydev.c +0
-2@@ -450,8 +450,6 @@ joydev_table[minor] = joydev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,JOYDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/js%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,JOYDEV_MINOR_BASE + minor), dev->dev,"js%d" , minor);drivers/input/mousedev.c +0
-4@@ -645,8 +645,6 @@ mousedev_table[minor] = mousedev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/mouse%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE + minor), dev->dev,"mouse%d" , minor);@@ -734,8 +732,6 @@ mousedev_mix.exist =1 ; mousedev_mix.minor =MOUSEDEV_MIX ; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE +MOUSEDEV_MIX ), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/mice" );class_device_create (input_class,MKDEV (INPUT_MAJOR ,MOUSEDEV_MINOR_BASE +MOUSEDEV_MIX ),NULL ,"mice" );drivers/input/tsdev.c +0
-4@@ -410,10 +410,6 @@ tsdev_table[minor] = tsdev; -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/ts%d" , minor); -devfs_mk_cdev (MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor +TSDEV_MINORS /2 ), -S_IFCHR |S_IRUGO |S_IWUSR ,"input/tsraw%d" , minor);class_device_create (input_class,MKDEV (INPUT_MAJOR ,TSDEV_MINOR_BASE + minor), dev->dev,"ts%d" , minor);drivers/macintosh/adb.c +0
-2@@ -900,8 +900,6 @@return ; } -devfs_mk_cdev (MKDEV (ADB_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"adb" ); - adb_dev_class =class_create (THIS_MODULE ,"adb" );if (IS_ERR (adb_dev_class))return ;drivers/sbus/char/bpp.c +0
-4@@ -1048,10 +1048,6 @@ instances[idx].opened =0 ;probeLptPort (idx); } -for (idx =0 ; idx <BPP_NO ; idx++) { -devfs_mk_cdev (MKDEV (BPP_MAJOR , idx), -S_IFCHR |S_IRUSR |S_IWUSR ,"bpp/%d" , idx); - }return 0 ; }drivers/sbus/char/vfc_dev.c +0
-4@@ -165,10 +165,6 @@return -EINVAL ;if (init_vfc_hw (dev))return -EIO ; - -devfs_mk_cdev (MKDEV (VFC_MAJOR , instance), -S_IFCHR |S_IRUSR |S_IWUSR , -"vfc/%d" , instance);return 0 ; }drivers/telephony/phonedev.c +0
-2@@ -105,8 +105,6 @@if (phone_device[i] ==NULL ) { phone_device[i] = p; p->minor = i; -devfs_mk_cdev (MKDEV (PHONE_MAJOR ,i), -S_IFCHR |S_IRUSR |S_IWUSR ,"phone/%d" , i);up (&phone_lock);return 0 ; }sound/core/sound.c +0
-10@@ -39,7 +39,6 @@static int major =CONFIG_SND_MAJOR ;int snd_major;static int cards_limit =1 ; -static int device_mode =S_IFCHR |S_IRUGO |S_IWUGO ;MODULE_AUTHOR ("Jaroslav Kysela <[email protected]>" );MODULE_DESCRIPTION ("Advanced Linux Sound Architecture driver for soundcards." );@@ -48,10 +47,6 @@MODULE_PARM_DESC (major,"Major # for sound driver." );module_param (cards_limit, int,0444 );MODULE_PARM_DESC (cards_limit,"Count of auto-loadable soundcards." ); -#ifdef CONFIG_DEVFS_FS -module_param (device_mode, int,0444 ); -MODULE_PARM_DESC (device_mode,"Device file permission mask for devfs." ); -#endif MODULE_ALIAS_CHARDEV_MAJOR (CONFIG_SND_MAJOR );/* this one holds the actual max. card number currently available. @@ -227,8 +222,6 @@return -EBUSY ; }list_add_tail (&preg->list, &snd_minors_hash[SNDRV_MINOR_CARD (minor)]); -if (strncmp (name,"controlC" ,8 ) || card->number >= cards_limit) -devfs_mk_cdev (MKDEV (major, minor),S_IFCHR | device_mode,"snd/%s" , name);if (card) device = card->dev;class_device_create (sound_class,MKDEV (major, minor), device,"%s" , name);@@ -330,7 +323,6 @@static int __init alsa_sound_init (void ) { -short controlnum;int err;int card;@@ -353,8 +345,6 @@return -ENOMEM ; }snd_info_minor_register (); -for (controlnum =0 ; controlnum < cards_limit; controlnum++) -devfs_mk_cdev (MKDEV (major, controlnum<<5 ),S_IFCHR | device_mode,"snd/controlC%d" , controlnum);#ifndef MODULE printk (KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n" );#endif sound/oss/soundcard.c +1
-9@@ -564,9 +564,6 @@ sound_dmap_flag = (dmabuf >0 ?1 :0 );for (i =0 ; i <sizeof (dev_list) /sizeof *dev_list; i++) { -devfs_mk_cdev (MKDEV (SOUND_MAJOR , dev_list[i].minor), -S_IFCHR | dev_list[i].mode, -"sound/%s" , dev_list[i].name);class_device_create (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor),NULL ,"%s" , dev_list[i].name);@@ -574,15 +571,10 @@if (!dev_list[i].num)continue ; -for (j =1 ; j < *dev_list[i].num; j++) { -devfs_mk_cdev (MKDEV (SOUND_MAJOR , - dev_list[i].minor + (j*0x10 )), -S_IFCHR | dev_list[i].mode, -"sound/%s%d" , dev_list[i].name, j); +for (j =1 ; j < *dev_list[i].num; j++)class_device_create (sound_class,MKDEV (SOUND_MAJOR , dev_list[i].minor + (j*0x10 )),NULL ,"%s%d" , dev_list[i].name, j); - } }if (sound_nblocks >=1024 )sound/sound_core.c +0
-2@@ -172,8 +172,6 @@else sprintf (s->name,"sound/%s%d" , name, r /SOUND_STEP ); -devfs_mk_cdev (MKDEV (SOUND_MAJOR , s->unit_minor), -S_IFCHR | mode, s->name);class_device_create (sound_class,MKDEV (SOUND_MAJOR , s->unit_minor),NULL , s->name+6 );return r;drivers/char/ftape/zftape/zftape-init.c +0
-18@@ -332,29 +332,11 @@ zft_class =class_create (THIS_MODULE ,"zft" );for (i =0 ; i <4 ; i++) {class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i),NULL ,"qft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"qft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +4 ),NULL ,"nqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +4 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +16 ),NULL ,"zqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +16 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"zqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +20 ),NULL ,"nzqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +20 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nzqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +32 ),NULL ,"rawqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +32 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"rawqft%i" , i);class_device_create (zft_class,MKDEV (QIC117_TAPE_MAJOR , i +36 ),NULL ,"nrawrawqft%i" , i); -devfs_mk_cdev (MKDEV (QIC117_TAPE_MAJOR , i +36 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"nrawqft%i" , i); }#ifdef CONFIG_ZFT_COMPRESSOR drivers/char/ip2main.c +0
-17@@ -724,25 +724,8 @@if (NULL != ( pB = i2BoardPtrTable[i] ) ) {class_device_create (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i),NULL ,"ipl%d" , i); - err =devfs_mk_cdev (MKDEV (IP2_IPL_MAJOR ,4 * i), -S_IRUSR |S_IWUSR |S_IRGRP |S_IFCHR , -"ip2/ipl%d" , i); -if (err) { -class_device_destroy (ip2_class, -MKDEV (IP2_IPL_MAJOR ,4 * i)); - goto out_class; - } -class_device_create (ip2_class,MKDEV (IP2_IPL_MAJOR ,4 * i +1 ),NULL ,"stat%d" , i); - err =devfs_mk_cdev (MKDEV (IP2_IPL_MAJOR ,4 * i +1 ), -S_IRUSR |S_IWUSR |S_IRGRP |S_IFCHR , -"ip2/stat%d" , i); -if (err) { -class_device_destroy (ip2_class, -MKDEV (IP2_IPL_MAJOR ,4 * i +1 )); - goto out_class; - }for ( box =0 ; box <ABS_MAX_BOXES ; ++box ) {drivers/char/ipmi/ipmi_devintf.c +0
-3@@ -526,9 +526,6 @@ {dev_t dev =MKDEV (ipmi_major, if_num); -devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR , -"ipmidev/%d" , if_num); -class_device_create (ipmi_class, dev,NULL ,"ipmi%d" , if_num); }drivers/char/istallion.c +1
-5@@ -5242,13 +5242,9 @@ "device\n"); istallion_class =class_create (THIS_MODULE ,"staliomem" ); -for (i =0 ; i <4 ; i++) { -devfs_mk_cdev (MKDEV (STL_SIOMEMMAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_create (istallion_class,MKDEV (STL_SIOMEMMAJOR , i),NULL ,"staliomem%d" , i); - }/* * Set up the tty driver structure and register us as a driver. drivers/char/misc.c +1
-8@@ -208,7 +208,7 @@ {struct miscdevice *c;dev_t dev; -int err; +int err =0 ;down (&misc_sem);list_for_each_entry (c, &misc_list, list) {@@ -245,13 +245,6 @@ goto out; } - err =devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP , - misc->devfs_name); -if (err) { -class_device_destroy (misc_class, dev); - goto out; - } -/* * Add it to the front, so that later devices can "override" * earlier defaults drivers/char/ppdev.c +0
-4@@ -781,10 +781,6 @@ err =PTR_ERR (ppdev_class); goto out_chrdev; } -for (i =0 ; i <PARPORT_MAX ; i++) { -devfs_mk_cdev (MKDEV (PP_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO ,"parports/%d" , i); - }if (parport_register_driver (&pp_driver)) { printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); goto out_class;drivers/char/raw.c +0
-8@@ -287,7 +287,6 @@static int __init raw_init (void ) { -int i;dev_t dev =MKDEV (RAW_MAJOR ,0 );if (register_chrdev_region (dev,MAX_RAW_MINORS ,"raw" ))@@ -309,13 +308,6 @@ }class_device_create (raw_class,MKDEV (RAW_MAJOR ,0 ),NULL ,"rawctl" ); -devfs_mk_cdev (MKDEV (RAW_MAJOR ,0 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"raw/rawctl" ); -for (i =1 ; i <MAX_RAW_MINORS ; i++) -devfs_mk_cdev (MKDEV (RAW_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO , -"raw/raw%d" , i);return 0 ; error:drivers/char/stallion.c +1
-5@@ -3090,12 +3090,8 @@printk ("STALLION: failed to register serial board device\n" ); stallion_class =class_create (THIS_MODULE ,"staliomem" ); -for (i =0 ; i <4 ; i++) { -devfs_mk_cdev (MKDEV (STL_SIOMEMMAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR , -"staliomem/%d" , i); +for (i =0 ; i <4 ; i++)class_device_create (stallion_class,MKDEV (STL_SIOMEMMAJOR , i),NULL ,"staliomem%d" , i); - } stl_serial->owner =THIS_MODULE ; stl_serial->driver_name = stl_drvname;drivers/char/tipar.c +0
-10@@ -438,12 +438,6 @@class_device_create (tipar_class,MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr),NULL ,"par%d" , nr); -/* Use devfs, tree: /dev/ticables/par/[0..2] */ - err =devfs_mk_cdev (MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr), -S_IFCHR |S_IRUGO |S_IWUGO , -"ticables/par/%d" , nr); -if (err) - goto out_class;/* Display informations */ pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==@@ -455,11 +449,7 @@pr_info ("tipar%d: link cable not found\n" , nr); err =0 ; - goto out; -out_class: -class_device_destroy (tipar_class,MKDEV (TIPAR_MAJOR ,TIPAR_MINOR + nr)); -class_destroy (tipar_class); out:return err; }drivers/char/viotape.c +0
-4@@ -959,10 +959,6 @@ "iseries!vt%d", i);class_device_create (tape_class,MKDEV (VIOTAPE_MAJOR , i |0x80 ),NULL ,"iseries!nvt%d" , i); -devfs_mk_cdev (MKDEV (VIOTAPE_MAJOR , i),S_IFCHR |S_IRUSR |S_IWUSR , -"iseries/vt%d" , i); -devfs_mk_cdev (MKDEV (VIOTAPE_MAJOR , i |0x80 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"iseries/nvt%d" , i);sprintf (tapename,"iseries/vt%d" , i); printk(VIOTAPE_KERN_INFO "tape %s is iSeries " "resource %10.10s type %4.4s, model %3.3s\n",drivers/char/dsp56k.c +0
-8@@ -517,17 +517,9 @@ }class_device_create (dsp56k_class,MKDEV (DSP56K_MAJOR ,0 ),NULL ,"dsp56k" ); - err =devfs_mk_cdev (MKDEV (DSP56K_MAJOR ,0 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"dsp56k" ); -if (err) - goto out_class; -printk (banner); goto out; -out_class: -class_device_destroy (dsp56k_class,MKDEV (DSP56K_MAJOR ,0 )); -class_destroy (dsp56k_class); out_chrdev:unregister_chrdev (DSP56K_MAJOR ,"dsp56k" ); out:drivers/char/dtlk.c +0
-3@@ -337,9 +337,6 @@if (dtlk_dev_probe () ==0 )printk (", MAJOR %d\n" , dtlk_major); -devfs_mk_cdev (MKDEV (dtlk_major,DTLK_MINOR ), -S_IFCHR |S_IRUSR |S_IWUSR ,"dtlk" ); -init_timer (&dtlk_timer); dtlk_timer.function = dtlk_timer_tick;init_waitqueue_head (&dtlk_process_list);drivers/char/mem.c +2
-5@@ -866,13 +866,10 @@printk ("unable to get major %d for memory devs\n" ,MEM_MAJOR ); mem_class =class_create (THIS_MODULE ,"mem" ); -for (i =0 ; i <ARRAY_SIZE (devlist); i++) { +for (i =0 ; i <ARRAY_SIZE (devlist); i++)class_device_create (mem_class,MKDEV (MEM_MAJOR , devlist[i].minor),NULL , devlist[i].name); -devfs_mk_cdev (MKDEV (MEM_MAJOR , devlist[i].minor), -S_IFCHR | devlist[i].mode, devlist[i].name); - } - +return 0 ; }drivers/char/tty_io.c +0
-7@@ -2680,9 +2680,6 @@return ; } -devfs_mk_cdev (dev,S_IFCHR |S_IRUSR |S_IWUSR , -"%s%d" , driver->devfs_name, index + driver->name_base); -if (driver->type ==TTY_DRIVER_TYPE_PTY )pty_line_name (driver, index, name);else @@ -2946,14 +2943,12 @@if (cdev_add (&tty_cdev,MKDEV (TTYAUX_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,0 ),1 ,"/dev/tty" ) <0 )panic ("Couldn't register /dev/tty driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,0 ),S_IFCHR |S_IRUGO |S_IWUGO ,"tty" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,0 ),NULL ,"tty" );cdev_init (&console_cdev, &console_fops);if (cdev_add (&console_cdev,MKDEV (TTYAUX_MAJOR ,1 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,1 ),1 ,"/dev/console" ) <0 )panic ("Couldn't register /dev/console driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,1 ),S_IFCHR |S_IRUSR |S_IWUSR ,"console" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,1 ),NULL ,"console" );#ifdef CONFIG_UNIX98_PTYS @@ -2961,7 +2956,6 @@if (cdev_add (&ptmx_cdev,MKDEV (TTYAUX_MAJOR ,2 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,2 ),1 ,"/dev/ptmx" ) <0 )panic ("Couldn't register /dev/ptmx driver\n" ); -devfs_mk_cdev (MKDEV (TTYAUX_MAJOR ,2 ),S_IFCHR |S_IRUGO |S_IWUGO ,"ptmx" );class_device_create (tty_class,MKDEV (TTYAUX_MAJOR ,2 ),NULL ,"ptmx" );#endif @@ -2970,7 +2964,6 @@if (cdev_add (&vc0_cdev,MKDEV (TTY_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTY_MAJOR ,0 ),1 ,"/dev/vc/0" ) <0 )panic ("Couldn't register /dev/tty0 driver\n" ); -devfs_mk_cdev (MKDEV (TTY_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vc/0" );class_device_create (tty_class,MKDEV (TTY_MAJOR ,0 ),NULL ,"tty0" );vty_init ();drivers/char/vc_screen.c +0
-8@@ -478,12 +478,6 @@void vcs_make_devfs (struct tty_struct *tty) { -devfs_mk_cdev (MKDEV (VCS_MAJOR , tty->index +1 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"vcc/%u" , tty->index +1 ); -devfs_mk_cdev (MKDEV (VCS_MAJOR , tty->index +129 ), -S_IFCHR |S_IRUSR |S_IWUSR , -"vcc/a%u" , tty->index +1 );class_device_create (vc_class,MKDEV (VCS_MAJOR , tty->index +1 ),NULL ,"vcs%u" , tty->index +1 );class_device_create (vc_class,MKDEV (VCS_MAJOR , tty->index +129 ),NULL ,"vcsa%u" , tty->index +1 ); }@@ -501,8 +495,6 @@panic ("unable to get major %d for vcs device" ,VCS_MAJOR ); vc_class =class_create (THIS_MODULE ,"vc" ); -devfs_mk_cdev (MKDEV (VCS_MAJOR ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vcc/0" ); -devfs_mk_cdev (MKDEV (VCS_MAJOR ,128 ),S_IFCHR |S_IRUSR |S_IWUSR ,"vcc/a0" );class_device_create (vc_class,MKDEV (VCS_MAJOR ,0 ),NULL ,"vcs" );class_device_create (vc_class,MKDEV (VCS_MAJOR ,128 ),NULL ,"vcsa" );return 0 ;drivers/isdn/capi/capi.c +0
-2@@ -1506,8 +1506,6 @@ }class_device_create (capi_class,MKDEV (capi_major,0 ),NULL ,"capi" ); -devfs_mk_cdev (MKDEV (capi_major,0 ),S_IFCHR |S_IRUSR |S_IWUSR , -"isdn/capi20" );#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE if (capinc_tty_init () <0 ) {drivers/isdn/hardware/eicon/divamnt.c +0
-1@@ -190,7 +190,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }drivers/isdn/hardware/eicon/divasi.c +0
-1@@ -157,7 +157,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }drivers/isdn/hardware/eicon/divasmain.c +0
-1@@ -690,7 +690,6 @@ DRIVERLNAME);return (0 ); } -devfs_mk_cdev (MKDEV (major,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,DEVNAME );return (1 ); }drivers/mtd/mtdchar.c +0
-44@@ -15,48 +15,6 @@#include <linux/fs.h> #include <asm/uaccess.h> -#ifdef CONFIG_DEVFS_FS -#include <linux/devfs_fs_kernel.h> - -static void mtd_notify_add (struct mtd_info * mtd) -{ -if (!mtd) -return ; - -devfs_mk_cdev (MKDEV (MTD_CHAR_MAJOR , mtd->index*2 ), -S_IFCHR |S_IRUGO |S_IWUGO ,"mtd/%d" , mtd->index); - -devfs_mk_cdev (MKDEV (MTD_CHAR_MAJOR , mtd->index*2 +1 ), -S_IFCHR |S_IRUGO ,"mtd/%dro" , mtd->index); -} - -static void mtd_notify_remove (struct mtd_info * mtd) -{ -if (!mtd) -return ; -devfs_remove ("mtd/%d" , mtd->index); -devfs_remove ("mtd/%dro" , mtd->index); -} - -static struct mtd_notifier notifier = { - .add = mtd_notify_add, - .remove = mtd_notify_remove, -}; - -static inline void mtdchar_devfs_init (void ) -{ -register_mtd_user (¬ifier); -} - -static inline void mtdchar_devfs_exit (void ) -{ -unregister_mtd_user (¬ifier); -devfs_remove ("mtd" ); -} -#else /* !DEVFS */ -#define mtdchar_devfs_init () do { } while(0) -#define mtdchar_devfs_exit () do { } while(0) -#endif static loff_t mtd_lseek (struct file *file,loff_t offset,int orig) {@@ -542,13 +500,11 @@return -EAGAIN ; } -mtdchar_devfs_init ();return 0 ; } static void __exit cleanup_mtdchar(void) { -mtdchar_devfs_exit ();unregister_chrdev (MTD_CHAR_MAJOR ,"mtd" ); }drivers/scsi/osst.c +1
-12@@ -5668,7 +5668,7 @@struct st_partstat * STps;struct osst_buffer * buffer;struct gendisk * drive; -int i, mode, dev_num; +int i, dev_num;if (SDp->type !=TYPE_TAPE || !osst_supports (SDp))return -ENODEV ;@@ -5804,17 +5804,6 @@snprintf (name,8 ,"%s%s" ,"n" ,tape_name (tpnt));osst_sysfs_add (MKDEV (OSST_MAJOR , dev_num +128 ), dev, tpnt, name); } -for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { -/* Rewind entry */ -devfs_mk_cdev (MKDEV (OSST_MAJOR , dev_num + (mode <<5 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/ot%s" , SDp->devfs_name, osst_formats[mode]); - -/* No-rewind entry */ -devfs_mk_cdev (MKDEV (OSST_MAJOR , dev_num + (mode <<5 ) +128 ), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/ot%sn" , SDp->devfs_name, osst_formats[mode]); - } drive->number =-1 ; printk(KERN_INFOdrivers/scsi/sg.c +0
-3@@ -1539,9 +1539,6 @@ k = error; sdp = sg_dev_arr[k]; -devfs_mk_cdev (MKDEV (SCSI_GENERIC_MAJOR , k), -S_IFCHR |S_IRUSR |S_IWUSR |S_IRGRP , -"%s/generic" , scsidp->devfs_name); error =cdev_add (cdev,MKDEV (SCSI_GENERIC_MAJOR , k),1 );if (error) {devfs_remove ("%s/generic" , scsidp->devfs_name);drivers/scsi/st.c +0
-13@@ -3984,19 +3984,6 @@do_create_class_files (tpnt, dev_num, mode); } -for (mode =0 ; mode <ST_NBR_MODES ; ++mode) { -/* Make sure that the minor numbers corresponding to the four -first modes always get the same names */ - i = mode << (4 -ST_NBR_MODE_BITS ); -/* Rewind entry */ -devfs_mk_cdev (MKDEV (SCSI_TAPE_MAJOR ,TAPE_MINOR (dev_num, mode,0 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt%s" , SDp->devfs_name, st_formats[i]); -/* No-rewind entry */ -devfs_mk_cdev (MKDEV (SCSI_TAPE_MAJOR ,TAPE_MINOR (dev_num, mode,1 )), -S_IFCHR |S_IRUGO |S_IWUGO , -"%s/mt%sn" , SDp->devfs_name, st_formats[i]); - } disk->number =-1 ; printk(KERN_WARNINGarch/sparc64/solaris/socksys.c +0
-2@@ -190,8 +190,6 @@return ret; } -devfs_mk_cdev (MKDEV (30 ,0 ),S_IFCHR |S_IRUSR |S_IWUSR ,"socksys" ); - file =fcheck (ret);/* N.B. Is this valid? Suppose the f_ops are in a module ... */ socksys_file_ops = *file->f_op;drivers/char/lp.c +0
-2@@ -806,8 +806,6 @@class_device_create (lp_class,MKDEV (LP_MAJOR , nr),NULL ,"lp%d" , nr); -devfs_mk_cdev (MKDEV (LP_MAJOR , nr),S_IFCHR |S_IRUGO |S_IWUGO , -"printers/%d" , nr);printk (KERN_INFO "lp%d: using %s (%s).\n" , nr, port->name, (port->irq ==PARPORT_IRQ_NONE )?"polling" :"interrupt-driven" );drivers/i2c/i2c-dev.c +0
-2@@ -432,8 +432,6 @@if (IS_ERR (i2c_dev))return PTR_ERR (i2c_dev); -devfs_mk_cdev (MKDEV (I2C_MAJOR , i2c_dev->minor), -S_IFCHR |S_IRUSR |S_IWUSR ,"i2c/%d" , i2c_dev->minor);dev_dbg (&adap->dev,"Registered as minor %d\n" , i2c_dev->minor);/* register this i2c device with the driver core */ drivers/media/dvb/dvb-core/dvbdev.c +0
-4@@ -231,10 +231,6 @@list_add_tail (&dvbdev->list_head, &adap->device_list); -devfs_mk_cdev (MKDEV (DVB_MAJOR ,nums2minor (adap->num, type, id)), -S_IFCHR |S_IRUSR |S_IWUSR , -"dvb/adapter%d/%s%d" , adap->num, dnames[type], id); -class_device_create (dvb_class,MKDEV (DVB_MAJOR ,nums2minor (adap->num, type, id)),NULL ,"dvb%d.%s%d" , adap->num, dnames[type], id);drivers/media/video/videodev.c +2
-4@@ -329,9 +329,6 @@ vfd->minor=i;up (&videodev_lock); -sprintf (vfd->devfs_name,"v4l/%s%d" , name_base, i - base); -devfs_mk_cdev (MKDEV (VIDEO_MAJOR , vfd->minor), -S_IFCHR |S_IRUSR |S_IWUSR , vfd->devfs_name);init_MUTEX (&vfd->lock);/* sysfs class */ @@ -340,7 +337,8 @@ vfd->class_dev.dev = vfd->dev; vfd->class_dev.class = &video_class; vfd->class_dev.devt =MKDEV (VIDEO_MAJOR , vfd->minor); -strlcpy (vfd->class_dev.class_id, vfd->devfs_name +4 ,BUS_ID_SIZE ); +sprintf (vfd->devfs_name,"%s%d" , name_base, i - base); +strlcpy (vfd->class_dev.class_id, vfd->devfs_name,BUS_ID_SIZE );class_device_register (&vfd->class_dev);class_device_create_file (&vfd->class_dev, &class_device_attr_name);drivers/net/ppp_generic.c +0
-7@@ -864,10 +864,6 @@ goto out_chrdev; }class_device_create (ppp_class,MKDEV (PPP_MAJOR ,0 ),NULL ,"ppp" ); - err =devfs_mk_cdev (MKDEV (PPP_MAJOR ,0 ), -S_IFCHR |S_IRUSR |S_IWUSR ,"ppp" ); -if (err) - goto out_class; } out:@@ -875,9 +871,6 @@printk (KERN_ERR "failed to register PPP device (%d)\n" , err);return err; -out_class: -class_device_destroy (ppp_class,MKDEV (PPP_MAJOR ,0 )); -class_destroy (ppp_class); out_chrdev:unregister_chrdev (PPP_MAJOR ,"ppp" ); goto out;drivers/net/wan/cosa.c +0
-7@@ -401,13 +401,6 @@for (i=0 ; i<nr_cards; i++) {class_device_create (cosa_class,MKDEV (cosa_major, i),NULL ,"cosa%d" , i); - err =devfs_mk_cdev (MKDEV (cosa_major, i), -S_IFCHR |S_IRUSR |S_IWUSR , -"cosa/%d" , i); -if (err) { -class_device_destroy (cosa_class,MKDEV (cosa_major, i)); - goto out_chrdev; - } } err =0 ; goto out;drivers/video/fbmem.c +0
-2@@ -1099,8 +1099,6 @@ registered_fb[i] = fb_info; -devfs_mk_cdev (MKDEV (FB_MAJOR , i), -S_IFCHR |S_IRUGO |S_IWUGO ,"fb/%d" , i); event.info = fb_info;notifier_call_chain (&fb_notifier_list,FB_EVENT_FB_REGISTERED , &event);drivers/usb/core/file.c +0
-1@@ -162,7 +162,6 @@/* handle the devfs registration */ snprintf (name,BUS_ID_SIZE , class_driver->name, minor - minor_base); -devfs_mk_cdev (MKDEV (USB_MAJOR , minor), class_driver->mode, name);/* create a usb class device for this usb interface */ temp =strrchr (name,'/' );fs/coda/psdev.c +1
-10@@ -368,21 +368,12 @@ err =PTR_ERR (coda_psdev_class); goto out_chrdev; } -for (i =0 ; i <MAX_CODADEVS ; i++) { +for (i =0 ; i <MAX_CODADEVS ; i++)class_device_create (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR ,i),NULL ,"cfs%d" , i); - err =devfs_mk_cdev (MKDEV (CODA_PSDEV_MAJOR , i), -S_IFCHR |S_IRUSR |S_IWUSR ,"coda/%d" , i); -if (err) - goto out_class; - }coda_sysctl_init (); goto out; -out_class: -for (i =0 ; i <MAX_CODADEVS ; i++) -class_device_destroy (coda_psdev_class,MKDEV (CODA_PSDEV_MAJOR , i)); -class_destroy (coda_psdev_class); out_chrdev:unregister_chrdev (CODA_PSDEV_MAJOR ,"coda" ); out:include/linux/devfs_fs_kernel.h +0
-5@@ -7,10 +7,6 @@#include <linux/types.h> #include <asm/semaphore.h> -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, ...) { } -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 3 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin,
Quoted 1 line
From
Documentation/feature-removal-schedule.txt
What: devfs When: July 2005 Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs
function calls throughout the kernel tree
Why: It has been unmaintained for a number of years, has unfixable
races, contains a naming policy within the kernel that is against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>
This should not a surprise to anyone...
Ed Tomlinson
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 11 lines · Ed Tomlinson
Quoted 3 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin,
From
Documentation/feature-removal-schedule.txtWhat: devfs When: July 2005 Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs
Quoted 7 lines
function calls throughout the kernel tree
Why: It has been unmaintained for a number of years, has unfixable
races, contains a naming policy within the kernel that is against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>This should not a surprise to anyone...
I know the status of devfs, but I never thought the removal will be done in the middle of a stable line...
Armin
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 18 lines · Armin Schindler
Quoted 17 lines · Ed Tomlinson
Quoted 3 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin,
From
Documentation/feature-removal-schedule.txtWhat: devfs When: July 2005 Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfsfunction calls throughout the kernel tree
Why: It has been unmaintained for a number of years, has unfixable
races, contains a naming policy within the kernel that is against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>
Quoted 4 lines
Quoted 1 line
This should not a surprise to anyone...
I know the status of devfs, but I never thought the removal will be done in the middle of a stable line...
According to the current development model, 2.6 is a development kernel...
Quoted 1 line
Armin
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedRe: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
In reply to Armin SchindlerQuoted 18 lines · Armin Schindler
Quoted 17 lines · Ed Tomlinson
Quoted 3 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin,
From
Documentation/feature-removal-schedule.txtWhat: devfs When: July 2005 Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfsfunction calls throughout the kernel tree
Why: It has been unmaintained for a number of years, has unfixable
races, contains a naming policy within the kernel that is against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>
Quoted 4 lines
Quoted 1 line
This should not a surprise to anyone...
I know the status of devfs, but I never thought the removal will be done in the middle of a stable line...
Armin,
Its all the same in 2.6 - the 2.odd.x development, 2.even.x stable model is no longer being used. The current Linus kernel is 2.6.11.12, where the last .12 is the latest 2.6.11 kernel with VIF (very important fixes) applied.
Ed Tomlinson
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 21 lines · Ed Tomlinson
Quoted 20 lines · Armin Schindler
Quoted 18 lines · Ed Tomlinson
Quoted 3 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
Armin,
From
Documentation/feature-removal-schedule.txtWhat: devfs When: July 2005 Files: fs/devfs/*, include/linux/devfs_fs*.h and assorted devfsfunction calls throughout the kernel tree
Why: It has been unmaintained for a number of years, has unfixable
races, contains a naming policy within the kernel that is against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>This should not a surprise to anyone...
Quoted 8 lines
Quoted 2 lines
I know the status of devfs, but I never thought the removal will be done in the middle of a stable line...
Armin,
Its all the same in 2.6 - the 2.odd.x development, 2.even.x stable model is no longer being used. The current Linus kernel is 2.6.11.12, where the last .12 is the latest 2.6.11 kernel with VIF (very important fixes) applied.
Yes, I know and I like this new model. But I didn't get the idea of changing 'major' things from e.g. 2.6.11 to 2.6.12.
Thanks for the explanation.
Armin
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
In reply to Armin SchindlerQuoted 2 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
I'm guessing you missed the [00/22] announcement of this patch? Please see that one for links to the issues surrounding this topic.
thanks,
greg k-h
Re: [PATCH] Remove devfs_mk_cdev() function from the kernel tree
Quoted 6 lines · Greg KH
Quoted 2 lines · Armin Schindler
It didn't follow the development, is devfs now obsolete in kernel? If not, these funktions still makes sense.
I'm guessing you missed the [00/22] announcement of this patch? Please see that one for links to the issues surrounding this topic.
Yes, I missed that one. Thanks.
Armin