aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-06-21 00:15:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-26 15:25:07 -0400
commit7c69ef79741910883d5543caafa06aca3ebadbd1 (patch)
tree655d3f60abee0195d0aadb2c86ab04ccca89a307
parent1a715c5cf917326a285533d1116d725f5f2593c2 (diff)
[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>
-rw-r--r--arch/sparc64/solaris/socksys.c2
-rw-r--r--drivers/block/acsi_slm.c4
-rw-r--r--drivers/block/paride/pg.c11
-rw-r--r--drivers/block/paride/pt.c16
-rw-r--r--drivers/char/dsp56k.c8
-rw-r--r--drivers/char/dtlk.c3
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c18
-rw-r--r--drivers/char/ip2/ip2main.c17
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c3
-rw-r--r--drivers/char/istallion.c6
-rw-r--r--drivers/char/lp.c2
-rw-r--r--drivers/char/mem.c5
-rw-r--r--drivers/char/misc.c9
-rw-r--r--drivers/char/ppdev.c4
-rw-r--r--drivers/char/raw.c8
-rw-r--r--drivers/char/stallion.c6
-rw-r--r--drivers/char/tipar.c10
-rw-r--r--drivers/char/tty_io.c7
-rw-r--r--drivers/char/vc_screen.c8
-rw-r--r--drivers/char/viotape.c4
-rw-r--r--drivers/isdn/capi/capi.c2
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c1
-rw-r--r--drivers/macintosh/adb.c2
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c4
-rw-r--r--drivers/media/video/videodev.c7
-rw-r--r--drivers/net/ppp_generic.c7
-rw-r--r--drivers/net/wan/cosa.c7
-rw-r--r--drivers/sbus/char/bpp.c4
-rw-r--r--drivers/sbus/char/vfc_dev.c4
-rw-r--r--drivers/telephony/phonedev.c2
-rw-r--r--drivers/video/fbmem.c2
-rw-r--r--fs/coda/psdev.c11
-rw-r--r--include/linux/devfs_fs_kernel.h4
35 files changed, 8 insertions, 202 deletions
diff --git a/arch/sparc64/solaris/socksys.c b/arch/sparc64/solaris/socksys.c
index fc6669e8dde1..30ba11682cae 100644
--- a/arch/sparc64/solaris/socksys.c
+++ b/arch/sparc64/solaris/socksys.c
@@ -190,8 +190,6 @@ init_socksys(void)
190 return ret; 190 return ret;
191 } 191 }
192 192
193 devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys");
194
195 file = fcheck(ret); 193 file = fcheck(ret);
196 /* N.B. Is this valid? Suppose the f_ops are in a module ... */ 194 /* N.B. Is this valid? Suppose the f_ops are in a module ... */
197 socksys_file_ops = *file->f_op; 195 socksys_file_ops = *file->f_op;
diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c
index 1ecbcc3da147..b087b3a6f06f 100644
--- a/drivers/block/acsi_slm.c
+++ b/drivers/block/acsi_slm.c
@@ -1005,10 +1005,6 @@ int slm_init( void )
1005 BufferP = SLMBuffer; 1005 BufferP = SLMBuffer;
1006 SLMState = IDLE; 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 return 0; 1008 return 0;
1013} 1009}
1014 1010
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index 9f72bdd2e206..3d464f767eaf 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -676,22 +676,13 @@ static int __init pg_init(void)
676 } 676 }
677 for (unit = 0; unit < PG_UNITS; unit++) { 677 for (unit = 0; unit < PG_UNITS; unit++) {
678 struct pg *dev = &devices[unit]; 678 struct pg *dev = &devices[unit];
679 if (dev->present) { 679 if (dev->present)
680 class_device_create(pg_class, NULL, MKDEV(major, unit), 680 class_device_create(pg_class, NULL, MKDEV(major, unit),
681 NULL, "pg%u", unit); 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 err = 0; 683 err = 0;
690 goto out; 684 goto out;
691 685
692out_class:
693 class_device_destroy(pg_class, MKDEV(major, unit));
694 class_destroy(pg_class);
695out_chrdev: 686out_chrdev:
696 unregister_chrdev(major, "pg"); 687 unregister_chrdev(major, "pg");
697out: 688out:
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index 7adadd5b29fc..c85bdcb384ae 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -975,27 +975,11 @@ static int __init pt_init(void)
975 if (pt[unit].present) { 975 if (pt[unit].present) {
976 class_device_create(pt_class, NULL, MKDEV(major, unit), 976 class_device_create(pt_class, NULL, MKDEV(major, unit),
977 NULL, "pt%d", unit); 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 class_device_create(pt_class, NULL, MKDEV(major, unit + 128), 978 class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
986 NULL, "pt%dn", unit); 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 goto out; 981 goto out;
996 982
997out_class:
998 class_destroy(pt_class);
999out_chrdev: 983out_chrdev:
1000 unregister_chrdev(major, "pt"); 984 unregister_chrdev(major, "pt");
1001out: 985out:
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index e233cf280bc0..45caf778578c 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -518,17 +518,9 @@ static int __init dsp56k_init_driver(void)
518 } 518 }
519 class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); 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 printk(banner); 521 printk(banner);
527 goto out; 522 goto out;
528 523
529out_class:
530 class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
531 class_destroy(dsp56k_class);
532out_chrdev: 524out_chrdev:
533 unregister_chrdev(DSP56K_MAJOR, "dsp56k"); 525 unregister_chrdev(DSP56K_MAJOR, "dsp56k");
534out: 526out:
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 87dcaa237f07..e34b4f4d1c27 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -337,9 +337,6 @@ static int __init dtlk_init(void)
337 if (dtlk_dev_probe() == 0) 337 if (dtlk_dev_probe() == 0)
338 printk(", MAJOR %d\n", dtlk_major); 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 init_timer(&dtlk_timer); 340 init_timer(&dtlk_timer);
344 dtlk_timer.function = dtlk_timer_tick; 341 dtlk_timer.function = dtlk_timer_tick;
345 init_waitqueue_head(&dtlk_process_list); 342 init_waitqueue_head(&dtlk_process_list);
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index 821357ce7e0e..8c6090c3a421 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -332,29 +332,11 @@ KERN_INFO
332 zft_class = class_create(THIS_MODULE, "zft"); 332 zft_class = class_create(THIS_MODULE, "zft");
333 for (i = 0; i < 4; i++) { 333 for (i = 0; i < 4; i++) {
334 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); 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 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); 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 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); 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 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); 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 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); 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 class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); 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#ifdef CONFIG_ZFT_COMPRESSOR 342#ifdef CONFIG_ZFT_COMPRESSOR
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 9ab33c3d359f..afc25db4975f 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -724,26 +724,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
724 class_device_create(ip2_class, NULL, 724 class_device_create(ip2_class, NULL,
725 MKDEV(IP2_IPL_MAJOR, 4 * i), 725 MKDEV(IP2_IPL_MAJOR, 4 * i),
726 NULL, "ipl%d", i); 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 class_device_create(ip2_class, NULL, 727 class_device_create(ip2_class, NULL,
737 MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 728 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738 NULL, "stat%d", i); 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 for ( box = 0; box < ABS_MAX_BOXES; ++box ) 731 for ( box = 0; box < ABS_MAX_BOXES; ++box )
749 { 732 {
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index 55c57451ee1d..ec22aba12be9 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -804,9 +804,6 @@ static void ipmi_new_smi(int if_num, struct device *device)
804 dev_t dev = MKDEV(ipmi_major, if_num); 804 dev_t dev = MKDEV(ipmi_major, if_num);
805 struct ipmi_reg_list *entry; 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 entry = kmalloc(sizeof(*entry), GFP_KERNEL); 807 entry = kmalloc(sizeof(*entry), GFP_KERNEL);
811 if (!entry) { 808 if (!entry) {
812 printk(KERN_ERR "ipmi_devintf: Unable to create the" 809 printk(KERN_ERR "ipmi_devintf: Unable to create the"
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index d5054ea47472..1395d4a5204e 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -5214,14 +5214,10 @@ int __init stli_init(void)
5214 "device\n"); 5214 "device\n");
5215 5215
5216 istallion_class = class_create(THIS_MODULE, "staliomem"); 5216 istallion_class = class_create(THIS_MODULE, "staliomem");
5217 for (i = 0; i < 4; i++) { 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);
5221 class_device_create(istallion_class, NULL, 5218 class_device_create(istallion_class, NULL,
5222 MKDEV(STL_SIOMEMMAJOR, i), 5219 MKDEV(STL_SIOMEMMAJOR, i),
5223 NULL, "staliomem%d", i); 5220 NULL, "staliomem%d", i);
5224 }
5225 5221
5226/* 5222/*
5227 * Set up the tty driver structure and register us as a driver. 5223 * Set up the tty driver structure and register us as a driver.
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index f07a9e361f39..1a08e8ea238f 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -807,8 +807,6 @@ static int lp_register(int nr, struct parport *port)
807 807
808 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, 808 class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL,
809 "lp%d", nr); 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 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 811 printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name,
814 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); 812 (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 1fa9fa157c12..e7aa71575aa2 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -941,13 +941,10 @@ static int __init chr_dev_init(void)
941 printk("unable to get major %d for memory devs\n", MEM_MAJOR); 941 printk("unable to get major %d for memory devs\n", MEM_MAJOR);
942 942
943 mem_class = class_create(THIS_MODULE, "mem"); 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 class_device_create(mem_class, NULL, 945 class_device_create(mem_class, NULL,
946 MKDEV(MEM_MAJOR, devlist[i].minor), 946 MKDEV(MEM_MAJOR, devlist[i].minor),
947 NULL, devlist[i].name); 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 return 0; 949 return 0;
953} 950}
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 96eb2a709e21..71e513771048 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -204,7 +204,7 @@ int misc_register(struct miscdevice * misc)
204{ 204{
205 struct miscdevice *c; 205 struct miscdevice *c;
206 dev_t dev; 206 dev_t dev;
207 int err; 207 int err = 0;
208 208
209 down(&misc_sem); 209 down(&misc_sem);
210 list_for_each_entry(c, &misc_list, list) { 210 list_for_each_entry(c, &misc_list, list) {
@@ -241,13 +241,6 @@ int misc_register(struct miscdevice * misc)
241 goto out; 241 goto out;
242 } 242 }
243 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 goto out;
249 }
250
251 /* 244 /*
252 * Add it to the front, so that later devices can "override" 245 * Add it to the front, so that later devices can "override"
253 * earlier defaults 246 * earlier defaults
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index d437a4c9e634..ba350799405c 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -782,10 +782,6 @@ static int __init ppdev_init (void)
782 err = PTR_ERR(ppdev_class); 782 err = PTR_ERR(ppdev_class);
783 goto out_chrdev; 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 if (parport_register_driver(&pp_driver)) { 785 if (parport_register_driver(&pp_driver)) {
790 printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); 786 printk (KERN_WARNING CHRDEV ": unable to register with parport\n");
791 goto out_class; 787 goto out_class;
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index 15a7b4086524..72c8ee4c0069 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -288,7 +288,6 @@ static struct cdev raw_cdev = {
288 288
289static int __init raw_init(void) 289static int __init raw_init(void)
290{ 290{
291 int i;
292 dev_t dev = MKDEV(RAW_MAJOR, 0); 291 dev_t dev = MKDEV(RAW_MAJOR, 0);
293 292
294 if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw")) 293 if (register_chrdev_region(dev, MAX_RAW_MINORS, "raw"))
@@ -310,13 +309,6 @@ static int __init raw_init(void)
310 } 309 }
311 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 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 return 0; 312 return 0;
321 313
322error: 314error:
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index c090a63fbdea..a1a68f90d803 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -3071,14 +3071,10 @@ static int __init stl_init(void)
3071 printk("STALLION: failed to register serial board device\n"); 3071 printk("STALLION: failed to register serial board device\n");
3072 3072
3073 stallion_class = class_create(THIS_MODULE, "staliomem"); 3073 stallion_class = class_create(THIS_MODULE, "staliomem");
3074 for (i = 0; i < 4; i++) { 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);
3078 class_device_create(stallion_class, NULL, 3075 class_device_create(stallion_class, NULL,
3079 MKDEV(STL_SIOMEMMAJOR, i), NULL, 3076 MKDEV(STL_SIOMEMMAJOR, i), NULL,
3080 "staliomem%d", i); 3077 "staliomem%d", i);
3081 }
3082 3078
3083 stl_serial->owner = THIS_MODULE; 3079 stl_serial->owner = THIS_MODULE;
3084 stl_serial->driver_name = stl_drvname; 3080 stl_serial->driver_name = stl_drvname;
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index 70cfe07ab999..0dc83a5bd4c1 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -443,12 +443,6 @@ tipar_register(int nr, struct parport *port)
443 443
444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, 444 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
445 TIPAR_MINOR + nr), NULL, "par%d", nr); 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 /* Display informations */ 447 /* Display informations */
454 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == 448 pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
@@ -460,11 +454,7 @@ tipar_register(int nr, struct parport *port)
460 pr_info("tipar%d: link cable not found\n", nr); 454 pr_info("tipar%d: link cable not found\n", nr);
461 455
462 err = 0; 456 err = 0;
463 goto out;
464 457
465out_class:
466 class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr));
467 class_destroy(tipar_class);
468out: 458out:
469 return err; 459 return err;
470} 460}
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 8b2a59969868..0b9a33c0f1bd 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2979,9 +2979,6 @@ struct class_device *tty_register_device(struct tty_driver *driver,
2979 return ERR_PTR(-EINVAL); 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 if (driver->type == TTY_DRIVER_TYPE_PTY) 2982 if (driver->type == TTY_DRIVER_TYPE_PTY)
2986 pty_line_name(driver, index, name); 2983 pty_line_name(driver, index, name);
2987 else 2984 else
@@ -3241,14 +3238,12 @@ static int __init tty_init(void)
3241 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || 3238 if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
3242 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 3239 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
3243 panic("Couldn't register /dev/tty driver\n"); 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 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 3241 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
3246 3242
3247 cdev_init(&console_cdev, &console_fops); 3243 cdev_init(&console_cdev, &console_fops);
3248 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 3244 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
3249 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 3245 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
3250 panic("Couldn't register /dev/console driver\n"); 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 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 3247 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
3253 3248
3254#ifdef CONFIG_UNIX98_PTYS 3249#ifdef CONFIG_UNIX98_PTYS
@@ -3256,7 +3251,6 @@ static int __init tty_init(void)
3256 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || 3251 if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) ||
3257 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 3252 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
3258 panic("Couldn't register /dev/ptmx driver\n"); 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 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 3254 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3261#endif 3255#endif
3262 3256
@@ -3265,7 +3259,6 @@ static int __init tty_init(void)
3265 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || 3259 if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) ||
3266 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 3260 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3267 panic("Couldn't register /dev/tty0 driver\n"); 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 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 3262 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3270 3263
3271 vty_init(); 3264 vty_init();
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 3c1dafaa3441..1633d8206524 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -478,12 +478,6 @@ static struct class *vc_class;
478 478
479void vcs_make_devfs(struct tty_struct *tty) 479void 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 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), 481 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
488 NULL, "vcs%u", tty->index + 1); 482 NULL, "vcs%u", tty->index + 1);
489 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), 483 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
@@ -503,8 +497,6 @@ int __init vcs_init(void)
503 panic("unable to get major %d for vcs device", VCS_MAJOR); 497 panic("unable to get major %d for vcs device", VCS_MAJOR);
504 vc_class = class_create(THIS_MODULE, "vc"); 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 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 500 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
509 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 501 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
510 return 0; 502 return 0;
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index ebc337acca15..4c1a128fd77b 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -958,10 +958,6 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
958 "iseries!vt%d", i); 958 "iseries!vt%d", i);
959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), 959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
960 NULL, "iseries!nvt%d", i); 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 sprintf(tapename, "iseries/vt%d", i); 961 sprintf(tapename, "iseries/vt%d", i);
966 printk(VIOTAPE_KERN_INFO "tape %s is iSeries " 962 printk(VIOTAPE_KERN_INFO "tape %s is iSeries "
967 "resource %10.10s type %4.4s, model %3.3s\n", 963 "resource %10.10s type %4.4s, model %3.3s\n",
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 2e541fa02024..1c8fe77270ae 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1516,8 +1516,6 @@ static int __init capi_init(void)
1516 } 1516 }
1517 1517
1518 class_device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi"); 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#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE 1520#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
1523 if (capinc_tty_init() < 0) { 1521 if (capinc_tty_init() < 0) {
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index 6146f7633be5..12465b3c2b4d 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -190,7 +190,6 @@ static int DIVA_INIT_FUNCTION divas_maint_register_chrdev(void)
190 DRIVERLNAME); 190 DRIVERLNAME);
191 return (0); 191 return (0);
192 } 192 }
193 devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
194 193
195 return (1); 194 return (1);
196} 195}
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index df715b47e2b4..2d80d94b5d0c 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -157,7 +157,6 @@ static int DIVA_INIT_FUNCTION divas_idi_register_chrdev(void)
157 DRIVERLNAME); 157 DRIVERLNAME);
158 return (0); 158 return (0);
159 } 159 }
160 devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
161 160
162 return (1); 161 return (1);
163} 162}
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index c9b26e86d183..71b3e06cbe39 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -690,7 +690,6 @@ static int DIVA_INIT_FUNCTION divas_register_chrdev(void)
690 DRIVERLNAME); 690 DRIVERLNAME);
691 return (0); 691 return (0);
692 } 692 }
693 devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME);
694 693
695 return (1); 694 return (1);
696} 695}
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 259fd8973ce9..a60e3abaa8e0 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -904,8 +904,6 @@ adbdev_init(void)
904 return; 904 return;
905 } 905 }
906 906
907 devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb");
908
909 adb_dev_class = class_create(THIS_MODULE, "adb"); 907 adb_dev_class = class_create(THIS_MODULE, "adb");
910 if (IS_ERR(adb_dev_class)) 908 if (IS_ERR(adb_dev_class))
911 return; 909 return;
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index cf78a72320e5..8e926d98bd92 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -231,10 +231,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
231 231
232 mutex_unlock(&dvbdev_register_lock); 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 class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), 234 class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
239 adap->device, "dvb%d.%s%d", adap->num, dnames[type], id); 235 adap->device, "dvb%d.%s%d", adap->num, dnames[type], id);
240 236
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index 2dfa7f23d0ca..cc67ee952838 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1563,10 +1563,6 @@ int video_register_device(struct video_device *vfd, int type, int nr)
1563 video_device[i]=vfd; 1563 video_device[i]=vfd;
1564 vfd->minor=i; 1564 vfd->minor=i;
1565 mutex_unlock(&videodev_lock); 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 mutex_init(&vfd->lock); 1566 mutex_init(&vfd->lock);
1571 1567
1572 /* sysfs class */ 1568 /* sysfs class */
@@ -1575,7 +1571,8 @@ int video_register_device(struct video_device *vfd, int type, int nr)
1575 vfd->class_dev.dev = vfd->dev; 1571 vfd->class_dev.dev = vfd->dev;
1576 vfd->class_dev.class = &video_class; 1572 vfd->class_dev.class = &video_class;
1577 vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); 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 class_device_register(&vfd->class_dev); 1576 class_device_register(&vfd->class_dev);
1580 class_device_create_file(&vfd->class_dev, 1577 class_device_create_file(&vfd->class_dev,
1581 &class_device_attr_name); 1578 &class_device_attr_name);
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index d643a097faa5..52bc51545134 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -863,10 +863,6 @@ static int __init ppp_init(void)
863 goto out_chrdev; 863 goto out_chrdev;
864 } 864 }
865 class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); 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
872out: 868out:
@@ -874,9 +870,6 @@ out:
874 printk(KERN_ERR "failed to register PPP device (%d)\n", err); 870 printk(KERN_ERR "failed to register PPP device (%d)\n", err);
875 return err; 871 return err;
876 872
877out_class:
878 class_device_destroy(ppp_class, MKDEV(PPP_MAJOR,0));
879 class_destroy(ppp_class);
880out_chrdev: 873out_chrdev:
881 unregister_chrdev(PPP_MAJOR, "ppp"); 874 unregister_chrdev(PPP_MAJOR, "ppp");
882 goto out; 875 goto out;
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 62b7087e44d0..c7b530628c8e 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -401,13 +401,6 @@ static int __init cosa_init(void)
401 for (i=0; i<nr_cards; i++) { 401 for (i=0; i<nr_cards; i++) {
402 class_device_create(cosa_class, NULL, MKDEV(cosa_major, i), 402 class_device_create(cosa_class, NULL, MKDEV(cosa_major, i),
403 NULL, "cosa%d", i); 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 err = 0; 405 err = 0;
413 goto out; 406 goto out;
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index 03f6e9880692..e680de41d762 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -1031,10 +1031,6 @@ static int __init bpp_init(void)
1031 instances[idx].opened = 0; 1031 instances[idx].opened = 0;
1032 probeLptPort(idx); 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 return 0; 1035 return 0;
1040} 1036}
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 31232ce72071..5d32384ad728 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -164,10 +164,6 @@ int init_vfc_device(struct sbus_dev *sdev,struct vfc_dev *dev, int instance)
164 return -EINVAL; 164 return -EINVAL;
165 if (init_vfc_hw(dev)) 165 if (init_vfc_hw(dev))
166 return -EIO; 166 return -EIO;
167
168 devfs_mk_cdev(MKDEV(VFC_MAJOR, instance),
169 S_IFCHR | S_IRUSR | S_IWUSR,
170 "vfc/%d", instance);
171 return 0; 167 return 0;
172} 168}
173 169
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c
index e166fffea86b..80f9fe405279 100644
--- a/drivers/telephony/phonedev.c
+++ b/drivers/telephony/phonedev.c
@@ -106,8 +106,6 @@ int phone_register_device(struct phone_device *p, int unit)
106 if (phone_device[i] == NULL) { 106 if (phone_device[i] == NULL) {
107 phone_device[i] = p; 107 phone_device[i] = p;
108 p->minor = i; 108 p->minor = i;
109 devfs_mk_cdev(MKDEV(PHONE_MAJOR,i),
110 S_IFCHR|S_IRUSR|S_IWUSR, "phone/%d", i);
111 mutex_unlock(&phone_lock); 109 mutex_unlock(&phone_lock);
112 return 0; 110 return 0;
113 } 111 }
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 93546a848f46..be2479ab8bc1 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1331,8 +1331,6 @@ register_framebuffer(struct fb_info *fb_info)
1331 fb_add_videomode(&mode, &fb_info->modelist); 1331 fb_add_videomode(&mode, &fb_info->modelist);
1332 registered_fb[i] = fb_info; 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 event.info = fb_info; 1334 event.info = fb_info;
1337 blocking_notifier_call_chain(&fb_notifier_list, 1335 blocking_notifier_call_chain(&fb_notifier_list,
1338 FB_EVENT_FB_REGISTERED, &event); 1336 FB_EVENT_FB_REGISTERED, &event);
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index a193823f9058..f478222cb5c9 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -365,21 +365,12 @@ static int init_coda_psdev(void)
365 err = PTR_ERR(coda_psdev_class); 365 err = PTR_ERR(coda_psdev_class);
366 goto out_chrdev; 366 goto out_chrdev;
367 } 367 }
368 for (i = 0; i < MAX_CODADEVS; i++) { 368 for (i = 0; i < MAX_CODADEVS; i++)
369 class_device_create(coda_psdev_class, NULL, 369 class_device_create(coda_psdev_class, NULL,
370 MKDEV(CODA_PSDEV_MAJOR,i), NULL, "cfs%d", i); 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 coda_sysctl_init(); 371 coda_sysctl_init();
377 goto out; 372 goto out;
378 373
379out_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);
383out_chrdev: 374out_chrdev:
384 unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); 375 unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
385out: 376out:
diff --git a/include/linux/devfs_fs_kernel.h b/include/linux/devfs_fs_kernel.h
index 6d9f003dbce5..c7d05dbc2af7 100644
--- a/include/linux/devfs_fs_kernel.h
+++ b/include/linux/devfs_fs_kernel.h
@@ -6,10 +6,6 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <asm/semaphore.h> 7#include <asm/semaphore.h>
8 8
9static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
10{
11 return 0;
12}
13static inline void devfs_remove(const char *fmt, ...) 9static inline void devfs_remove(const char *fmt, ...)
14{ 10{
15} 11}