Commit 7c69ef79741910883d5543caafa06aca3ebadbd1

Authored by Greg Kroah-Hartman
1 parent 1a715c5cf9

[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel tree

Removes the devfs_mk_cdev() function and all callers of it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Showing 35 changed files with 8 additions and 202 deletions Side-by-side Diff

arch/sparc64/solaris/socksys.c
... ... @@ -190,8 +190,6 @@
190 190 return ret;
191 191 }
192 192  
193   - devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys");
194   -
195 193 file = fcheck(ret);
196 194 /* N.B. Is this valid? Suppose the f_ops are in a module ... */
197 195 socksys_file_ops = *file->f_op;
drivers/block/acsi_slm.c
... ... @@ -1005,10 +1005,6 @@
1005 1005 BufferP = SLMBuffer;
1006 1006 SLMState = IDLE;
1007 1007  
1008   - for (i = 0; i < MAX_SLM; i++) {
1009   - devfs_mk_cdev(MKDEV(ACSI_MAJOR, i),
1010   - S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i);
1011   - }
1012 1008 return 0;
1013 1009 }
1014 1010  
drivers/block/paride/pg.c
... ... @@ -676,22 +676,13 @@
676 676 }
677 677 for (unit = 0; unit < PG_UNITS; unit++) {
678 678 struct pg *dev = &devices[unit];
679   - if (dev->present) {
  679 + if (dev->present)
680 680 class_device_create(pg_class, NULL, MKDEV(major, unit),
681 681 NULL, "pg%u", unit);
682   - err = devfs_mk_cdev(MKDEV(major, unit),
683   - S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u",
684   - unit);
685   - if (err)
686   - goto out_class;
687   - }
688 682 }
689 683 err = 0;
690 684 goto out;
691 685  
692   -out_class:
693   - class_device_destroy(pg_class, MKDEV(major, unit));
694   - class_destroy(pg_class);
695 686 out_chrdev:
696 687 unregister_chrdev(major, "pg");
697 688 out:
drivers/block/paride/pt.c
... ... @@ -975,27 +975,11 @@
975 975 if (pt[unit].present) {
976 976 class_device_create(pt_class, NULL, MKDEV(major, unit),
977 977 NULL, "pt%d", unit);
978   - err = devfs_mk_cdev(MKDEV(major, unit),
979   - S_IFCHR | S_IRUSR | S_IWUSR,
980   - "pt/%d", unit);
981   - if (err) {
982   - class_device_destroy(pt_class, MKDEV(major, unit));
983   - goto out_class;
984   - }
985 978 class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
986 979 NULL, "pt%dn", unit);
987   - err = devfs_mk_cdev(MKDEV(major, unit + 128),
988   - S_IFCHR | S_IRUSR | S_IWUSR,
989   - "pt/%dn", unit);
990   - if (err) {
991   - class_device_destroy(pt_class, MKDEV(major, unit + 128));
992   - goto out_class;
993   - }
994 980 }
995 981 goto out;
996 982  
997   -out_class:
998   - class_destroy(pt_class);
999 983 out_chrdev:
1000 984 unregister_chrdev(major, "pt");
1001 985 out:
drivers/char/dsp56k.c
... ... @@ -518,17 +518,9 @@
518 518 }
519 519 class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
520 520  
521   - err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0),
522   - S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k");
523   - if(err)
524   - goto out_class;
525   -
526 521 printk(banner);
527 522 goto out;
528 523  
529   -out_class:
530   - class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
531   - class_destroy(dsp56k_class);
532 524 out_chrdev:
533 525 unregister_chrdev(DSP56K_MAJOR, "dsp56k");
534 526 out:
... ... @@ -337,9 +337,6 @@
337 337 if (dtlk_dev_probe() == 0)
338 338 printk(", MAJOR %d\n", dtlk_major);
339 339  
340   - devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR),
341   - S_IFCHR | S_IRUSR | S_IWUSR, "dtlk");
342   -
343 340 init_timer(&dtlk_timer);
344 341 dtlk_timer.function = dtlk_timer_tick;
345 342 init_waitqueue_head(&dtlk_process_list);
drivers/char/ftape/zftape/zftape-init.c
... ... @@ -332,29 +332,11 @@
332 332 zft_class = class_create(THIS_MODULE, "zft");
333 333 for (i = 0; i < 4; i++) {
334 334 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i);
335   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i),
336   - S_IFCHR | S_IRUSR | S_IWUSR,
337   - "qft%i", i);
338 335 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i);
339   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4),
340   - S_IFCHR | S_IRUSR | S_IWUSR,
341   - "nqft%i", i);
342 336 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i);
343   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16),
344   - S_IFCHR | S_IRUSR | S_IWUSR,
345   - "zqft%i", i);
346 337 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i);
347   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20),
348   - S_IFCHR | S_IRUSR | S_IWUSR,
349   - "nzqft%i", i);
350 338 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i);
351   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32),
352   - S_IFCHR | S_IRUSR | S_IWUSR,
353   - "rawqft%i", i);
354 339 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i);
355   - devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36),
356   - S_IFCHR | S_IRUSR | S_IWUSR,
357   - "nrawqft%i", i);
358 340 }
359 341  
360 342 #ifdef CONFIG_ZFT_COMPRESSOR
drivers/char/ip2/ip2main.c
... ... @@ -724,26 +724,9 @@
724 724 class_device_create(ip2_class, NULL,
725 725 MKDEV(IP2_IPL_MAJOR, 4 * i),
726 726 NULL, "ipl%d", i);
727   - err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i),
728   - S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
729   - "ip2/ipl%d", i);
730   - if (err) {
731   - class_device_destroy(ip2_class,
732   - MKDEV(IP2_IPL_MAJOR, 4 * i));
733   - goto out_class;
734   - }
735   -
736 727 class_device_create(ip2_class, NULL,
737 728 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738 729 NULL, "stat%d", i);
739   - err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
740   - S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
741   - "ip2/stat%d", i);
742   - if (err) {
743   - class_device_destroy(ip2_class,
744   - MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
745   - goto out_class;
746   - }
747 730  
748 731 for ( box = 0; box < ABS_MAX_BOXES; ++box )
749 732 {
drivers/char/ipmi/ipmi_devintf.c
... ... @@ -804,9 +804,6 @@
804 804 dev_t dev = MKDEV(ipmi_major, if_num);
805 805 struct ipmi_reg_list *entry;
806 806  
807   - devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
808   - "ipmidev/%d", if_num);
809   -
810 807 entry = kmalloc(sizeof(*entry), GFP_KERNEL);
811 808 if (!entry) {
812 809 printk(KERN_ERR "ipmi_devintf: Unable to create the"
drivers/char/istallion.c
... ... @@ -5214,14 +5214,10 @@
5214 5214 "device\n");
5215 5215  
5216 5216 istallion_class = class_create(THIS_MODULE, "staliomem");
5217   - for (i = 0; i < 4; i++) {
5218   - devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
5219   - S_IFCHR | S_IRUSR | S_IWUSR,
5220   - "staliomem/%d", i);
  5217 + for (i = 0; i < 4; i++)
5221 5218 class_device_create(istallion_class, NULL,
5222 5219 MKDEV(STL_SIOMEMMAJOR, i),
5223 5220 NULL, "staliomem%d", i);
5224   - }
5225 5221  
5226 5222 /*
5227 5223 * Set up the tty driver structure and register us as a driver.
... ... @@ -807,8 +807,6 @@
807 807  
808 808 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL,
809 809 "lp%d", nr);
810   - devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO,
811   - "printers/%d", nr);
812 810  
813 811 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
814 812 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
... ... @@ -941,13 +941,10 @@
941 941 printk("unable to get major %d for memory devs\n", MEM_MAJOR);
942 942  
943 943 mem_class = class_create(THIS_MODULE, "mem");
944   - for (i = 0; i < ARRAY_SIZE(devlist); i++) {
  944 + for (i = 0; i < ARRAY_SIZE(devlist); i++)
945 945 class_device_create(mem_class, NULL,
946 946 MKDEV(MEM_MAJOR, devlist[i].minor),
947 947 NULL, devlist[i].name);
948   - devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor),
949   - S_IFCHR | devlist[i].mode, devlist[i].name);
950   - }
951 948  
952 949 return 0;
953 950 }
... ... @@ -204,7 +204,7 @@
204 204 {
205 205 struct miscdevice *c;
206 206 dev_t dev;
207   - int err;
  207 + int err = 0;
208 208  
209 209 down(&misc_sem);
210 210 list_for_each_entry(c, &misc_list, list) {
... ... @@ -238,13 +238,6 @@
238 238 "%s", misc->name);
239 239 if (IS_ERR(misc->class)) {
240 240 err = PTR_ERR(misc->class);
241   - goto out;
242   - }
243   -
244   - err = devfs_mk_cdev(dev, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP,
245   - misc->devfs_name);
246   - if (err) {
247   - class_device_destroy(misc_class, dev);
248 241 goto out;
249 242 }
250 243  
drivers/char/ppdev.c
... ... @@ -782,10 +782,6 @@
782 782 err = PTR_ERR(ppdev_class);
783 783 goto out_chrdev;
784 784 }
785   - for (i = 0; i < PARPORT_MAX; i++) {
786   - devfs_mk_cdev(MKDEV(PP_MAJOR, i),
787   - S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i);
788   - }
789 785 if (parport_register_driver(&pp_driver)) {
790 786 printk (KERN_WARNING CHRDEV ": unable to register with parport\n");
791 787 goto out_class;
... ... @@ -288,7 +288,6 @@
288 288  
289 289 static int __init raw_init(void)
290 290 {
291   - int i;
292 291 dev_t dev = MKDEV(RAW_MAJOR, 0);
293 292  
294 293 if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
... ... @@ -310,13 +309,6 @@
310 309 }
311 310 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
312 311  
313   - devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
314   - S_IFCHR | S_IRUGO | S_IWUGO,
315   - "raw/rawctl");
316   - for (i = 1; i < MAX_RAW_MINORS; i++)
317   - devfs_mk_cdev(MKDEV(RAW_MAJOR, i),
318   - S_IFCHR | S_IRUGO | S_IWUGO,
319   - "raw/raw%d", i);
320 312 return 0;
321 313  
322 314 error:
drivers/char/stallion.c
... ... @@ -3071,14 +3071,10 @@
3071 3071 printk("STALLION: failed to register serial board device\n");
3072 3072  
3073 3073 stallion_class = class_create(THIS_MODULE, "staliomem");
3074   - for (i = 0; i < 4; i++) {
3075   - devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
3076   - S_IFCHR|S_IRUSR|S_IWUSR,
3077   - "staliomem/%d", i);
  3074 + for (i = 0; i < 4; i++)
3078 3075 class_device_create(stallion_class, NULL,
3079 3076 MKDEV(STL_SIOMEMMAJOR, i), NULL,
3080 3077 "staliomem%d", i);
3081   - }
3082 3078  
3083 3079 stl_serial->owner = THIS_MODULE;
3084 3080 stl_serial->driver_name = stl_drvname;
drivers/char/tipar.c
... ... @@ -443,12 +443,6 @@
443 443  
444 444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
445 445 TIPAR_MINOR + nr), NULL, "par%d", nr);
446   - /* Use devfs, tree: /dev/ticables/par/[0..2] */
447   - err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
448   - S_IFCHR | S_IRUGO | S_IWUGO,
449   - "ticables/par/%d", nr);
450   - if (err)
451   - goto out_class;
452 446  
453 447 /* Display informations */
454 448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
455 449  
... ... @@ -460,11 +454,7 @@
460 454 pr_info("tipar%d: link cable not found\n", nr);
461 455  
462 456 err = 0;
463   - goto out;
464 457  
465   -out_class:
466   - class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr));
467   - class_destroy(tipar_class);
468 458 out:
469 459 return err;
470 460 }
drivers/char/tty_io.c
... ... @@ -2979,9 +2979,6 @@
2979 2979 return ERR_PTR(-EINVAL);
2980 2980 }
2981 2981  
2982   - devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
2983   - "%s%d", driver->devfs_name, index + driver->name_base);
2984   -
2985 2982 if (driver->type == TTY_DRIVER_TYPE_PTY)
2986 2983 pty_line_name(driver, index, name);
2987 2984 else
2988 2985  
... ... @@ -3241,14 +3238,12 @@
3241 3238 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
3242 3239 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
3243 3240 panic("Couldn't register /dev/tty driver\n");
3244   - devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
3245 3241 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
3246 3242  
3247 3243 cdev_init(&console_cdev, &console_fops);
3248 3244 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
3249 3245 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
3250 3246 panic("Couldn't register /dev/console driver\n");
3251   - devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console");
3252 3247 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
3253 3248  
3254 3249 #ifdef CONFIG_UNIX98_PTYS
... ... @@ -3256,7 +3251,6 @@
3256 3251 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
3257 3252 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
3258 3253 panic("Couldn't register /dev/ptmx driver\n");
3259   - devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx");
3260 3254 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3261 3255 #endif
3262 3256  
... ... @@ -3265,7 +3259,6 @@
3265 3259 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
3266 3260 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3267 3261 panic("Couldn't register /dev/tty0 driver\n");
3268   - devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0");
3269 3262 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3270 3263  
3271 3264 vty_init();
drivers/char/vc_screen.c
... ... @@ -478,12 +478,6 @@
478 478  
479 479 void vcs_make_devfs(struct tty_struct *tty)
480 480 {
481   - devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1),
482   - S_IFCHR|S_IRUSR|S_IWUSR,
483   - "vcc/%u", tty->index + 1);
484   - devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129),
485   - S_IFCHR|S_IRUSR|S_IWUSR,
486   - "vcc/a%u", tty->index + 1);
487 481 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
488 482 NULL, "vcs%u", tty->index + 1);
489 483 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
... ... @@ -503,8 +497,6 @@
503 497 panic("unable to get major %d for vcs device", VCS_MAJOR);
504 498 vc_class = class_create(THIS_MODULE, "vc");
505 499  
506   - devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0");
507   - devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0");
508 500 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
509 501 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
510 502 return 0;
drivers/char/viotape.c
... ... @@ -958,10 +958,6 @@
958 958 "iseries!vt%d", i);
959 959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
960 960 NULL, "iseries!nvt%d", i);
961   - devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR,
962   - "iseries/vt%d", i);
963   - devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80),
964   - S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i);
965 961 sprintf(tapename, "iseries/vt%d", i);
966 962 printk(VIOTAPE_KERN_INFO "tape %s is iSeries "
967 963 "resource %10.10s type %4.4s, model %3.3s\n",
drivers/isdn/capi/capi.c
... ... @@ -1516,8 +1516,6 @@
1516 1516 }
1517 1517  
1518 1518 class_device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
1519   - devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR,
1520   - "isdn/capi20");
1521 1519  
1522 1520 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1523 1521 if (capinc_tty_init() < 0) {
drivers/isdn/hardware/eicon/divamnt.c
... ... @@ -190,7 +190,6 @@
190 190 DRIVERLNAME);
191 191 return (0);
192 192 }
193   - devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
194 193  
195 194 return (1);
196 195 }
drivers/isdn/hardware/eicon/divasi.c
... ... @@ -157,7 +157,6 @@
157 157 DRIVERLNAME);
158 158 return (0);
159 159 }
160   - devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
161 160  
162 161 return (1);
163 162 }
drivers/isdn/hardware/eicon/divasmain.c
... ... @@ -690,7 +690,6 @@
690 690 DRIVERLNAME);
691 691 return (0);
692 692 }
693   - devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
694 693  
695 694 return (1);
696 695 }
drivers/macintosh/adb.c
... ... @@ -904,8 +904,6 @@
904 904 return;
905 905 }
906 906  
907   - devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb");
908   -
909 907 adb_dev_class = class_create(THIS_MODULE, "adb");
910 908 if (IS_ERR(adb_dev_class))
911 909 return;
drivers/media/dvb/dvb-core/dvbdev.c
... ... @@ -231,10 +231,6 @@
231 231  
232 232 mutex_unlock(&dvbdev_register_lock);
233 233  
234   - devfs_mk_cdev(MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
235   - S_IFCHR | S_IRUSR | S_IWUSR,
236   - "dvb/adapter%d/%s%d", adap->num, dnames[type], id);
237   -
238 234 class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
239 235 adap->device, "dvb%d.%s%d", adap->num, dnames[type], id);
240 236  
drivers/media/video/videodev.c
... ... @@ -1563,10 +1563,6 @@
1563 1563 video_device[i]=vfd;
1564 1564 vfd->minor=i;
1565 1565 mutex_unlock(&videodev_lock);
1566   -
1567   - sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base);
1568   - devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor),
1569   - S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name);
1570 1566 mutex_init(&vfd->lock);
1571 1567  
1572 1568 /* sysfs class */
... ... @@ -1575,7 +1571,8 @@
1575 1571 vfd->class_dev.dev = vfd->dev;
1576 1572 vfd->class_dev.class = &video_class;
1577 1573 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor);
1578   - strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE);
  1574 + sprintf(vfd->devfs_name, "%s%d", name_base, i - base);
  1575 + strlcpy(vfd->class_dev.class_id, vfd->devfs_name, BUS_ID_SIZE);
1579 1576 class_device_register(&vfd->class_dev);
1580 1577 class_device_create_file(&vfd->class_dev,
1581 1578 &class_device_attr_name);
drivers/net/ppp_generic.c
... ... @@ -863,10 +863,6 @@
863 863 goto out_chrdev;
864 864 }
865 865 class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp");
866   - err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0),
867   - S_IFCHR|S_IRUSR|S_IWUSR, "ppp");
868   - if (err)
869   - goto out_class;
870 866 }
871 867  
872 868 out:
... ... @@ -874,9 +870,6 @@
874 870 printk(KERN_ERR "failed to register PPP device (%d)\n", err);
875 871 return err;
876 872  
877   -out_class:
878   - class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0));
879   - class_destroy(ppp_class);
880 873 out_chrdev:
881 874 unregister_chrdev(PPP_MAJOR, "ppp");
882 875 goto out;
drivers/net/wan/cosa.c
... ... @@ -401,13 +401,6 @@
401 401 for (i=0; i<nr_cards; i++) {
402 402 class_device_create(cosa_class, NULL, MKDEV(cosa_major, i),
403 403 NULL, "cosa%d", i);
404   - err = devfs_mk_cdev(MKDEV(cosa_major, i),
405   - S_IFCHR|S_IRUSR|S_IWUSR,
406   - "cosa/%d", i);
407   - if (err) {
408   - class_device_destroy(cosa_class, MKDEV(cosa_major, i));
409   - goto out_chrdev;
410   - }
411 404 }
412 405 err = 0;
413 406 goto out;
drivers/sbus/char/bpp.c
... ... @@ -1031,10 +1031,6 @@
1031 1031 instances[idx].opened = 0;
1032 1032 probeLptPort(idx);
1033 1033 }
1034   - for (idx = 0; idx < BPP_NO; idx++) {
1035   - devfs_mk_cdev(MKDEV(BPP_MAJOR, idx),
1036   - S_IFCHR | S_IRUSR | S_IWUSR, "bpp/%d", idx);
1037   - }
1038 1034  
1039 1035 return 0;
1040 1036 }
drivers/sbus/char/vfc_dev.c
... ... @@ -164,10 +164,6 @@
164 164 return -EINVAL;
165 165 if (init_vfc_hw(dev))
166 166 return -EIO;
167   -
168   - devfs_mk_cdev(MKDEV(VFC_MAJOR, instance),
169   - S_IFCHR | S_IRUSR | S_IWUSR,
170   - "vfc/%d", instance);
171 167 return 0;
172 168 }
173 169  
drivers/telephony/phonedev.c
... ... @@ -106,8 +106,6 @@
106 106 if (phone_device[i] == NULL) {
107 107 phone_device[i] = p;
108 108 p->minor = i;
109   - devfs_mk_cdev(MKDEV(PHONE_MAJOR,i),
110   - S_IFCHR|S_IRUSR|S_IWUSR, "phone/%d", i);
111 109 mutex_unlock(&phone_lock);
112 110 return 0;
113 111 }
drivers/video/fbmem.c
... ... @@ -1331,8 +1331,6 @@
1331 1331 fb_add_videomode(&mode, &fb_info->modelist);
1332 1332 registered_fb[i] = fb_info;
1333 1333  
1334   - devfs_mk_cdev(MKDEV(FB_MAJOR, i),
1335   - S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i);
1336 1334 event.info = fb_info;
1337 1335 blocking_notifier_call_chain(&fb_notifier_list,
1338 1336 FB_EVENT_FB_REGISTERED, &event);
... ... @@ -365,21 +365,12 @@
365 365 err = PTR_ERR(coda_psdev_class);
366 366 goto out_chrdev;
367 367 }
368   - for (i = 0; i < MAX_CODADEVS; i++) {
  368 + for (i = 0; i < MAX_CODADEVS; i++)
369 369 class_device_create(coda_psdev_class, NULL,
370 370 MKDEV(CODA_PSDEV_MAJOR,i), NULL, "cfs%d", i);
371   - err = devfs_mk_cdev(MKDEV(CODA_PSDEV_MAJOR, i),
372   - S_IFCHR|S_IRUSR|S_IWUSR, "coda/%d", i);
373   - if (err)
374   - goto out_class;
375   - }
376 371 coda_sysctl_init();
377 372 goto out;
378 373  
379   -out_class:
380   - for (i = 0; i < MAX_CODADEVS; i++)
381   - class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
382   - class_destroy(coda_psdev_class);
383 374 out_chrdev:
384 375 unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
385 376 out:
include/linux/devfs_fs_kernel.h
... ... @@ -6,10 +6,6 @@
6 6 #include <linux/types.h>
7 7 #include <asm/semaphore.h>
8 8  
9   -static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
10   -{
11   - return 0;
12   -}
13 9 static inline void devfs_remove(const char *fmt, ...)
14 10 {
15 11 }