[PATCH] devfs: Remove devfs_mk_dir() function from the kernel tree
Removes the devfs_mk_dir() function and all callers of it.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 0897852..8f6bb93 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -841,7 +841,6 @@
{
int i;
- devfs_mk_dir("ubd");
if (register_blkdev(MAJOR_NR, "ubd"))
return -1;
@@ -855,7 +854,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;
}
diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c
index 4cb9c13..1ecbcc3 100644
--- a/drivers/block/acsi_slm.c
+++ b/drivers/block/acsi_slm.c
@@ -1005,7 +1005,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);
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index dff1e67..03a4dff 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -4261,8 +4261,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;
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 3c74ea7..f650d20 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1277,8 +1277,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];
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 7f554f2..618e258 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -642,7 +642,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;
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 79b8682..9f72bdd 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -674,7 +674,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) {
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index d2013d3..7adadd5 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -971,7 +971,6 @@
goto out_chrdev;
}
- devfs_mk_dir("pt");
for (unit = 0; unit < PT_UNITS; unit++)
if (pt[unit].present) {
class_device_create(pt_class, NULL, MKDEV(major, unit),
diff --git a/drivers/block/rd.c b/drivers/block/rd.c
index 940bfd7..67821a8 100644
--- a/drivers/block/rd.c
+++ b/drivers/block/rd.c
@@ -442,8 +442,6 @@
goto out;
}
- devfs_mk_dir("rd");
-
for (i = 0; i < CONFIG_BLK_DEV_RAM_COUNT; i++) {
struct gendisk *disk = rd_disks[i];
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 01f042f..018b292 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1019,8 +1019,6 @@
int err = -ENOMEM;
int i;
- devfs_mk_dir("floppy");
-
swim = find_devices("floppy");
while (swim && (floppy_count < MAX_FLOPPIES))
{
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 2ae08b3..9fb3f51 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1672,8 +1672,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;
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 60e9a94..088e5ba 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -2445,7 +2445,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;
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index 05c9e86..ee4499a 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -5808,8 +5808,6 @@
return -ENOMEM;
}
- devfs_mk_dir("sbp");
-
for (j=0;j<NR_SBPCD;j++)
{
struct cdrom_device_info * sbpcd_infop;
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index e1c9537..55c5745 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -872,8 +872,6 @@
ipmi_major = rv;
}
- devfs_mk_dir(DEVICE_NAME);
-
rv = ipmi_smi_watcher_register(&smi_watcher);
if (rv) {
unregister_chrdev(ipmi_major, DEVICE_NAME);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index ef20c1f..d5054ea 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -5213,7 +5213,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),
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index e572605..f07a9e3 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -907,7 +907,6 @@
return -EIO;
}
- devfs_mk_dir("printers");
lp_class = class_create(THIS_MODULE, "printer");
if (IS_ERR(lp_class)) {
err = PTR_ERR(lp_class);
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index bee6c47..d437a4c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -782,7 +782,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);
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 9b5a2c0..64d3d1d 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -351,7 +351,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");
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index a9c5a72..c090a63 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -3069,7 +3069,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++) {
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 079db5a..70cfe07 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -507,9 +507,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);
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 3edb347..181971a 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -68,7 +68,6 @@
{
init_buckets(_name_buckets);
init_buckets(_uuid_buckets);
- devfs_mk_dir(DM_DIR);
return 0;
}
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 306268e..33b1a89 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5553,7 +5553,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,
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 134c2bb..cf78a72 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -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;
@@ -410,8 +409,6 @@
goto error;
}
- devfs_mk_dir("dvb");
-
dvb_class = class_create(THIS_MODULE, "dvb");
if (IS_ERR(dvb_class)) {
retval = PTR_ERR(dvb_class);
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index 587458b..82c660b 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -555,7 +555,6 @@
if (major == 0)
major = res;
- devfs_mk_dir("mmc");
return mmc_register_driver(&mmc_driver);
out:
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index e392ee8..62b7087 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -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);
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index cfb1fff..09bf44f 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2111,9 +2111,6 @@
dasd_diag_discipline_pointer = NULL;
- rc = devfs_mk_dir("dasd");
- if (rc)
- goto failed;
rc = dasd_devmap_init();
if (rc)
goto failed;
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index 54ecd54..36bc01f 100644
--- a/drivers/s390/block/xpram.c
+++ b/drivers/s390/block/xpram.c
@@ -439,8 +439,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.
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index ccb20a6..03f6e98 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -1031,7 +1031,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);
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index ddcd330..31232ce 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -677,7 +677,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) {
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 31143af..93546a8 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1432,7 +1432,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);
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index 7caee8d..a193823 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -365,7 +365,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, NULL,
MKDEV(CODA_PSDEV_MAJOR,i), NULL, "cfs%d", i);
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
index d1dd876..ef8766e 100644
--- a/include/linux/devfs_fs_kernel.h
+++ b/include/linux/devfs_fs_kernel.h
@@ -18,10 +18,6 @@
{
return 0;
}
-static inline int devfs_mk_dir(const char *fmt, ...)
-{
- return 0;
-}
static inline void devfs_remove(const char *fmt, ...)
{
}
diff --git a/mm/shmem.c b/mm/shmem.c
index 38bc333..a4161ab 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2252,9 +2252,7 @@
printk(KERN_ERR "Could not register tmpfs\n");
goto out2;
}
-#ifdef CONFIG_TMPFS
- devfs_mk_dir("shm");
-#endif
+
shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER,
tmpfs_fs_type.name, NULL);
if (IS_ERR(shm_mnt)) {
diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c
index f9d6a9c..11ab99b 100644
--- a/mm/tiny-shmem.c
+++ b/mm/tiny-shmem.c
@@ -33,9 +33,6 @@
{
BUG_ON(register_filesystem(&tmpfs_fs_type) != 0);
-#ifdef CONFIG_TMPFS
- devfs_mk_dir("shm");
-#endif
shm_mnt = kern_mount(&tmpfs_fs_type);
BUG_ON(IS_ERR(shm_mnt));