]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Jun 2005 04:15:16 +0000 (21:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 26 Jun 2006 19:25:07 +0000 (12:25 -0700)
Removes the devfs_mk_cdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
35 files changed:
arch/sparc64/solaris/socksys.c
drivers/block/acsi_slm.c
drivers/block/paride/pg.c
drivers/block/paride/pt.c
drivers/char/dsp56k.c
drivers/char/dtlk.c
drivers/char/ftape/zftape/zftape-init.c
drivers/char/ip2/ip2main.c
drivers/char/ipmi/ipmi_devintf.c
drivers/char/istallion.c
drivers/char/lp.c
drivers/char/mem.c
drivers/char/misc.c
drivers/char/ppdev.c
drivers/char/raw.c
drivers/char/stallion.c
drivers/char/tipar.c
drivers/char/tty_io.c
drivers/char/vc_screen.c
drivers/char/viotape.c
drivers/isdn/capi/capi.c
drivers/isdn/hardware/eicon/divamnt.c
drivers/isdn/hardware/eicon/divasi.c
drivers/isdn/hardware/eicon/divasmain.c
drivers/macintosh/adb.c
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/video/videodev.c
drivers/net/ppp_generic.c
drivers/net/wan/cosa.c
drivers/sbus/char/bpp.c
drivers/sbus/char/vfc_dev.c
drivers/telephony/phonedev.c
drivers/video/fbmem.c
fs/coda/psdev.c
include/linux/devfs_fs_kernel.h

index fc6669e8dde189640a053c40f629e63720795d9c..30ba11682cae55c433d606dbe86622807b25ebb7 100644 (file)
@@ -190,8 +190,6 @@ init_socksys(void)
                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;
index 1ecbcc3da1476f864669d7d2f5ce9e61760f1b3a..b087b3a6f06f054b1f109b1e39f70da8776b6c59 100644 (file)
@@ -1005,10 +1005,6 @@ int slm_init( void )
        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;
 }
 
index 9f72bdd2e206fb5c395791daa279cc6cfb9905a9..3d464f767eaf02ae5a8dee4801a96bbe279f552d 100644 (file)
@@ -676,22 +676,13 @@ static int __init pg_init(void)
        }
        for (unit = 0; unit < PG_UNITS; unit++) {
                struct pg *dev = &devices[unit];
-               if (dev->present) {
+               if (dev->present)
                        class_device_create(pg_class, NULL, 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:
index 7adadd5b29fc32fee1a1e7f5f6a7e1e99d3730e5..c85bdcb384aedba98304c20527184c2540690223 100644 (file)
@@ -975,27 +975,11 @@ static int __init pt_init(void)
                if (pt[unit].present) {
                        class_device_create(pt_class, NULL, 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, NULL, 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:
index e233cf280bc024498c3fdd637d219e8159bb6f2a..45caf778578c79910f0007b3c63a22a6c3f60b6a 100644 (file)
@@ -518,17 +518,9 @@ static int __init dsp56k_init_driver(void)
        }
        class_device_create(dsp56k_class, NULL, 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:
index 87dcaa237f0753eb3e9f821bf17bb27b211b729d..e34b4f4d1c272b84c6537c3e4cf6247b239bb0e2 100644 (file)
@@ -337,9 +337,6 @@ static int __init dtlk_init(void)
        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);
index 821357ce7e0e86c3a529b7c3ae8850e9a7e9404c..8c6090c3a4213ec708fa25d51a4dc634d2ac122e 100644 (file)
@@ -332,29 +332,11 @@ KERN_INFO
        zft_class = class_create(THIS_MODULE, "zft");
        for (i = 0; i < 4; i++) {
                class_device_create(zft_class, NULL, 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, NULL, 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, NULL, 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, NULL, 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, NULL, 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, NULL, 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
index 9ab33c3d359fae4279f338e826280d06bda983ed..afc25db4975fb48fb0d29c8dd6c355886cfcb965 100644 (file)
@@ -724,26 +724,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
                                class_device_create(ip2_class, NULL,
                                                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, NULL,
                                                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 )
                            {
index 55c57451ee1dbf54b9cc1c5c76c70ab8d9386b6c..ec22aba12be98135b397e4e716bc276e16dc5fd1 100644 (file)
@@ -804,9 +804,6 @@ static void ipmi_new_smi(int if_num, struct device *device)
        dev_t dev = MKDEV(ipmi_major, if_num);
        struct ipmi_reg_list *entry;
 
-       devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
-                     "ipmidev/%d", if_num);
-
        entry = kmalloc(sizeof(*entry), GFP_KERNEL);
        if (!entry) {
                printk(KERN_ERR "ipmi_devintf: Unable to create the"
index d5054ea4747262100b1acbdaa4625765483b3f1c..1395d4a5204ed02cc6e9287d16ad8ae01b250cd5 100644 (file)
@@ -5214,14 +5214,10 @@ int __init stli_init(void)
                                "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, NULL,
                                MKDEV(STL_SIOMEMMAJOR, i),
                                NULL, "staliomem%d", i);
-       }
 
 /*
  *     Set up the tty driver structure and register us as a driver.
index f07a9e361f3980ca5f03464cccddd388b85010d8..1a08e8ea238f02e48dfb430ce6ab4018e3235f37 100644 (file)
@@ -807,8 +807,6 @@ static int lp_register(int nr, struct parport *port)
 
        class_device_create(lp_class, NULL, 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");
index 1fa9fa157c125652fea7cd314534992c4875a73b..e7aa71575aa2f589c0d13e8a97523e49c0c09d65 100644 (file)
@@ -941,13 +941,10 @@ static int __init chr_dev_init(void)
                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, NULL,
                                        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;
 }
index 96eb2a709e21d66ca7772d75c83ca79d595c81bf..71e513771048007f0a31ed8ebdd5841b769affe9 100644 (file)
@@ -204,7 +204,7 @@ int misc_register(struct miscdevice * misc)
 {
        struct miscdevice *c;
        dev_t dev;
-       int err;
+       int err = 0;
 
        down(&misc_sem);
        list_for_each_entry(c, &misc_list, list) {
@@ -241,13 +241,6 @@ int misc_register(struct miscdevice * misc)
                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
index d437a4c9e634bb63436e365a31c0921d74b582b0..ba350799405c4507368228ff37ecd52ca9e73110 100644 (file)
@@ -782,10 +782,6 @@ static int __init ppdev_init (void)
                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;
index 15a7b408652449ee421a14cf1e1fcc56004eed4e..72c8ee4c00693425e1d496c94a17c1e287f86853 100644 (file)
@@ -288,7 +288,6 @@ static struct cdev raw_cdev = {
 
 static int __init raw_init(void)
 {
-       int i;
        dev_t dev = MKDEV(RAW_MAJOR, 0);
 
        if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
@@ -310,13 +309,6 @@ static int __init raw_init(void)
        }
        class_device_create(raw_class, NULL, 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:
index c090a63fbdea055b9ab4002e8aeb8962723b24d3..a1a68f90d8030d2490f019ba1e5c99655a27f062 100644 (file)
@@ -3071,14 +3071,10 @@ static int __init stl_init(void)
                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, NULL,
                                    MKDEV(STL_SIOMEMMAJOR, i), NULL,
                                    "staliomem%d", i);
-       }
 
        stl_serial->owner = THIS_MODULE;
        stl_serial->driver_name = stl_drvname;
index 70cfe07ab999d0c644038921b71f8cc1da48c5f4..0dc83a5bd4c1e0fee5060b65f399337d8cb15011 100644 (file)
@@ -443,12 +443,6 @@ tipar_register(int nr, struct parport *port)
 
        class_device_create(tipar_class, NULL, 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 ==
@@ -460,11 +454,7 @@ tipar_register(int nr, struct parport *port)
                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;
 }
index 8b2a5996986819b62eccb4ffdb436d1d3903521a..0b9a33c0f1bd26c5ca24f1e09f7f2b3b45392598 100644 (file)
@@ -2979,9 +2979,6 @@ struct class_device *tty_register_device(struct tty_driver *driver,
                return ERR_PTR(-EINVAL);
        }
 
-       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
@@ -3241,14 +3238,12 @@ static int __init tty_init(void)
        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, NULL, 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, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
 
 #ifdef CONFIG_UNIX98_PTYS
@@ -3256,7 +3251,6 @@ static int __init tty_init(void)
        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, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
 #endif
 
@@ -3265,7 +3259,6 @@ static int __init tty_init(void)
        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, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
 
        vty_init();
index 3c1dafaa3441eacbeae9e2f924219fd5fea5e5fe..1633d8206524501516f3686c6006711b7b9d517c 100644 (file)
@@ -478,12 +478,6 @@ static struct class *vc_class;
 
 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, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
                        NULL, "vcs%u", tty->index + 1);
        class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
@@ -503,8 +497,6 @@ int __init vcs_init(void)
                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, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
        class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
        return 0;
index ebc337acca15090f252f284a47dcb77bc46dfc66..4c1a128fd77b537f72eeaecae4083a063a52457a 100644 (file)
@@ -958,10 +958,6 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
                        "iseries!vt%d", i);
        class_device_create(tape_class, NULL, 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",
index 2e541fa020241c468d95dff4f38047cf344f929b..1c8fe77270aeaa324bbf671e2c96af7d9720e4f9 100644 (file)
@@ -1516,8 +1516,6 @@ static int __init capi_init(void)
        }
 
        class_device_create(capi_class, NULL, 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) {
index 6146f7633be5d421b9c113836c22654bd8cbb1b3..12465b3c2b4d503c1d770072330a2b870cfdb6c3 100644 (file)
@@ -190,7 +190,6 @@ static int DIVA_INIT_FUNCTION divas_maint_register_chrdev(void)
                       DRIVERLNAME);
                return (0);
        }
-       devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
 
        return (1);
 }
index df715b47e2b43f64239821353ab4f9b22c3de4fb..2d80d94b5d0c54603310391b0d235928acc65944 100644 (file)
@@ -157,7 +157,6 @@ static int DIVA_INIT_FUNCTION divas_idi_register_chrdev(void)
                       DRIVERLNAME);
                return (0);
        }
-       devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
 
        return (1);
 }
index c9b26e86d183090555540d582eca4631c03d05d8..71b3e06cbe39c0e8c1fed19263f321a14e143ee7 100644 (file)
@@ -690,7 +690,6 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
                       DRIVERLNAME);
                return (0);
        }
-       devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
 
        return (1);
 }
index 259fd8973ce94c076064a2323a38b467d325d9c4..a60e3abaa8e0f263c80cdb29728de8bff95c2a75 100644 (file)
@@ -904,8 +904,6 @@ adbdev_init(void)
                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;
index cf78a72320e5380483401c0370e1c85f72c29c39..8e926d98bd92ac46a69e505fe410ae19bb30779a 100644 (file)
@@ -231,10 +231,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 
        mutex_unlock(&dvbdev_register_lock);
 
-       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, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
                            adap->device, "dvb%d.%s%d", adap->num, dnames[type], id);
 
index 2dfa7f23d0ca28f7e08a2fa7167184789c32cc29..cc67ee9528386ec507f5724df77515eb52ed5f40 100644 (file)
@@ -1563,10 +1563,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
        video_device[i]=vfd;
        vfd->minor=i;
        mutex_unlock(&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);
        mutex_init(&vfd->lock);
 
        /* sysfs class */
@@ -1575,7 +1571,8 @@ int video_register_device(struct video_device *vfd, int type, int nr)
                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);
index d643a097faa5cd8de1a234179d17ab55aa336ed3..52bc51545134c54387fddc62d0918a006c1e110e 100644 (file)
@@ -863,10 +863,6 @@ static int __init ppp_init(void)
                        goto out_chrdev;
                }
                class_device_create(ppp_class, NULL, 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:
@@ -874,9 +870,6 @@ static int __init ppp_init(void)
                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;
index 62b7087e44d03f36843355720986a4f503b49121..c7b530628c8e8279263c08701a74d197b922c0f9 100644 (file)
@@ -401,13 +401,6 @@ static int __init cosa_init(void)
        for (i=0; i<nr_cards; i++) {
                class_device_create(cosa_class, NULL, 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;
index 03f6e988069250f5d77b760c980aa20ff96ff11e..e680de41d762ce1c310c4a044d56dc4d27415e51 100644 (file)
@@ -1031,10 +1031,6 @@ static int __init bpp_init(void)
                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;
 }
index 31232ce72071eacb702ca605467d13adae7ccbfc..5d32384ad728f736c721902a359888df23e47753 100644 (file)
@@ -164,10 +164,6 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
                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;
 }
 
index e166fffea86ba5b971df5d6fd7e4f2c95240e689..80f9fe40527926abb8bd1338872a22f3f29f08bb 100644 (file)
@@ -106,8 +106,6 @@ int phone_register_device(struct phone_device *p, int unit)
                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);
                        mutex_unlock(&phone_lock);
                        return 0;
                }
index 93546a848f4660fc93398f5df45b0d69b08c7f82..be2479ab8bc1cf7d1088625cfc679c89f07c28c1 100644 (file)
@@ -1331,8 +1331,6 @@ register_framebuffer(struct fb_info *fb_info)
        fb_add_videomode(&mode, &fb_info->modelist);
        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;
        blocking_notifier_call_chain(&fb_notifier_list,
                            FB_EVENT_FB_REGISTERED, &event);
index a193823f9058fb0fc95a98421c139725f3c3a6ea..f478222cb5c93b73b7b2b846574df3cb0617d061 100644 (file)
@@ -365,21 +365,12 @@ static int init_coda_psdev(void)
                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, NULL,
                                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:
index 6d9f003dbce5837edbc86a0ef2f558ded609e5a1..c7d05dbc2af7292e5e101f7fe893fce6a18f6b9b 100644 (file)
@@ -6,10 +6,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, ...)
 {
 }