aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 01:25:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 12:52:52 -0400
commit53f4654272df7c51064825024340554b39c9efba (patch)
treee3e7b82a6bb0040ffbd267b250be2720704b98f2 /drivers
parent51d172d5f3a193e4b8f76179b2e55d7a36b94117 (diff)
[PATCH] Driver Core: fix up all callers of class_device_create()
The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/aoe/aoechr.c2
-rw-r--r--drivers/block/paride/pg.c2
-rw-r--r--drivers/block/paride/pt.c4
-rw-r--r--drivers/char/dsp56k.c2
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c12
-rw-r--r--drivers/char/ip2main.c10
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c2
-rw-r--r--drivers/char/istallion.c3
-rw-r--r--drivers/char/lp.c2
-rw-r--r--drivers/char/mem.c3
-rw-r--r--drivers/char/misc.c2
-rw-r--r--drivers/char/ppdev.c2
-rw-r--r--drivers/char/raw.c4
-rw-r--r--drivers/char/snsc.c2
-rw-r--r--drivers/char/stallion.c4
-rw-r--r--drivers/char/tipar.c2
-rw-r--r--drivers/char/tty_io.c10
-rw-r--r--drivers/char/vc_screen.c10
-rw-r--r--drivers/char/viotape.c4
-rw-r--r--drivers/hwmon/hwmon.c2
-rw-r--r--drivers/ide/ide-tape.c4
-rw-r--r--drivers/ieee1394/dv1394.c2
-rw-r--r--drivers/ieee1394/raw1394.c2
-rw-r--r--drivers/ieee1394/video1394.c2
-rw-r--r--drivers/infiniband/core/ucm.c2
-rw-r--r--drivers/input/evdev.c2
-rw-r--r--drivers/input/joydev.c2
-rw-r--r--drivers/input/mousedev.c4
-rw-r--r--drivers/input/tsdev.c2
-rw-r--r--drivers/isdn/capi/capi.c2
-rw-r--r--drivers/macintosh/adb.c2
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c2
-rw-r--r--drivers/message/i2o/iop.c2
-rw-r--r--drivers/mtd/mtdchar.c4
-rw-r--r--drivers/net/ppp_generic.c2
-rw-r--r--drivers/net/wan/cosa.c2
-rw-r--r--drivers/s390/char/tape_class.c1
-rw-r--r--drivers/s390/char/vmlogrdr.c1
-rw-r--r--drivers/scsi/ch.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/sg.c2
-rw-r--r--drivers/scsi/st.c2
-rw-r--r--drivers/usb/core/devio.c2
-rw-r--r--drivers/usb/core/file.c4
-rw-r--r--drivers/usb/core/hcd.c3
-rw-r--r--drivers/video/fbmem.c2
46 files changed, 78 insertions, 65 deletions
diff --git a/drivers/block/aoe/aoechr.c b/drivers/block/aoe/aoechr.c
index 45a243096187..41ae0ede619a 100644
--- a/drivers/block/aoe/aoechr.c
+++ b/drivers/block/aoe/aoechr.c
@@ -224,7 +224,7 @@ aoechr_init(void)
224 return PTR_ERR(aoe_class); 224 return PTR_ERR(aoe_class);
225 } 225 }
226 for (i = 0; i < ARRAY_SIZE(chardevs); ++i) 226 for (i = 0; i < ARRAY_SIZE(chardevs); ++i)
227 class_device_create(aoe_class, 227 class_device_create(aoe_class, NULL,
228 MKDEV(AOE_MAJOR, chardevs[i].minor), 228 MKDEV(AOE_MAJOR, chardevs[i].minor),
229 NULL, chardevs[i].name); 229 NULL, chardevs[i].name);
230 230
diff --git a/drivers/block/paride/pg.c b/drivers/block/paride/pg.c
index b3982395f22b..82f2d6d2eeef 100644
--- a/drivers/block/paride/pg.c
+++ b/drivers/block/paride/pg.c
@@ -674,7 +674,7 @@ static int __init pg_init(void)
674 for (unit = 0; unit < PG_UNITS; unit++) { 674 for (unit = 0; unit < PG_UNITS; unit++) {
675 struct pg *dev = &devices[unit]; 675 struct pg *dev = &devices[unit];
676 if (dev->present) { 676 if (dev->present) {
677 class_device_create(pg_class, MKDEV(major, unit), 677 class_device_create(pg_class, NULL, MKDEV(major, unit),
678 NULL, "pg%u", unit); 678 NULL, "pg%u", unit);
679 err = devfs_mk_cdev(MKDEV(major, unit), 679 err = devfs_mk_cdev(MKDEV(major, unit),
680 S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", 680 S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u",
diff --git a/drivers/block/paride/pt.c b/drivers/block/paride/pt.c
index d8d35233cf49..686c95573452 100644
--- a/drivers/block/paride/pt.c
+++ b/drivers/block/paride/pt.c
@@ -971,7 +971,7 @@ static int __init pt_init(void)
971 devfs_mk_dir("pt"); 971 devfs_mk_dir("pt");
972 for (unit = 0; unit < PT_UNITS; unit++) 972 for (unit = 0; unit < PT_UNITS; unit++)
973 if (pt[unit].present) { 973 if (pt[unit].present) {
974 class_device_create(pt_class, MKDEV(major, unit), 974 class_device_create(pt_class, NULL, MKDEV(major, unit),
975 NULL, "pt%d", unit); 975 NULL, "pt%d", unit);
976 err = devfs_mk_cdev(MKDEV(major, unit), 976 err = devfs_mk_cdev(MKDEV(major, unit),
977 S_IFCHR | S_IRUSR | S_IWUSR, 977 S_IFCHR | S_IRUSR | S_IWUSR,
@@ -980,7 +980,7 @@ static int __init pt_init(void)
980 class_device_destroy(pt_class, MKDEV(major, unit)); 980 class_device_destroy(pt_class, MKDEV(major, unit));
981 goto out_class; 981 goto out_class;
982 } 982 }
983 class_device_create(pt_class, MKDEV(major, unit + 128), 983 class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
984 NULL, "pt%dn", unit); 984 NULL, "pt%dn", unit);
985 err = devfs_mk_cdev(MKDEV(major, unit + 128), 985 err = devfs_mk_cdev(MKDEV(major, unit + 128),
986 S_IFCHR | S_IRUSR | S_IWUSR, 986 S_IFCHR | S_IRUSR | S_IWUSR,
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c
index 26271e3ca823..8693835cb2d5 100644
--- a/drivers/char/dsp56k.c
+++ b/drivers/char/dsp56k.c
@@ -515,7 +515,7 @@ static int __init dsp56k_init_driver(void)
515 err = PTR_ERR(dsp56k_class); 515 err = PTR_ERR(dsp56k_class);
516 goto out_chrdev; 516 goto out_chrdev;
517 } 517 }
518 class_device_create(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); 518 class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
519 519
520 err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), 520 err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0),
521 S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); 521 S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k");
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index 5745b74044ec..821357ce7e0e 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -331,27 +331,27 @@ KERN_INFO
331 331
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, 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), 335 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i),
336 S_IFCHR | S_IRUSR | S_IWUSR, 336 S_IFCHR | S_IRUSR | S_IWUSR,
337 "qft%i", i); 337 "qft%i", i);
338 class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); 338 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), 339 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4),
340 S_IFCHR | S_IRUSR | S_IWUSR, 340 S_IFCHR | S_IRUSR | S_IWUSR,
341 "nqft%i", i); 341 "nqft%i", i);
342 class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); 342 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), 343 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16),
344 S_IFCHR | S_IRUSR | S_IWUSR, 344 S_IFCHR | S_IRUSR | S_IWUSR,
345 "zqft%i", i); 345 "zqft%i", i);
346 class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); 346 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), 347 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20),
348 S_IFCHR | S_IRUSR | S_IWUSR, 348 S_IFCHR | S_IRUSR | S_IWUSR,
349 "nzqft%i", i); 349 "nzqft%i", i);
350 class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); 350 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), 351 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32),
352 S_IFCHR | S_IRUSR | S_IWUSR, 352 S_IFCHR | S_IRUSR | S_IWUSR,
353 "rawqft%i", i); 353 "rawqft%i", i);
354 class_device_create(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); 354 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), 355 devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36),
356 S_IFCHR | S_IRUSR | S_IWUSR, 356 S_IFCHR | S_IRUSR | S_IWUSR,
357 "nrawqft%i", i); 357 "nrawqft%i", i);
diff --git a/drivers/char/ip2main.c b/drivers/char/ip2main.c
index 9e4e26aef94e..d815d197dc3e 100644
--- a/drivers/char/ip2main.c
+++ b/drivers/char/ip2main.c
@@ -721,8 +721,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
721 } 721 }
722 722
723 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) { 723 if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
724 class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 724 class_device_create(ip2_class, NULL,
725 4 * i), NULL, "ipl%d", i); 725 MKDEV(IP2_IPL_MAJOR, 4 * i),
726 NULL, "ipl%d", i);
726 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), 727 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i),
727 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, 728 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
728 "ip2/ipl%d", i); 729 "ip2/ipl%d", i);
@@ -732,8 +733,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
732 goto out_class; 733 goto out_class;
733 } 734 }
734 735
735 class_device_create(ip2_class, MKDEV(IP2_IPL_MAJOR, 736 class_device_create(ip2_class, NULL,
736 4 * i + 1), NULL, "stat%d", i); 737 MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738 NULL, "stat%d", i);
737 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), 739 err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, 740 S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR,
739 "ip2/stat%d", i); 741 "ip2/stat%d", i);
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index a09ff1080687..7c0684deea06 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -798,7 +798,7 @@ static void ipmi_new_smi(int if_num)
798 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, 798 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
799 "ipmidev/%d", if_num); 799 "ipmidev/%d", if_num);
800 800
801 class_device_create(ipmi_class, dev, NULL, "ipmi%d", if_num); 801 class_device_create(ipmi_class, NULL, dev, NULL, "ipmi%d", if_num);
802} 802}
803 803
804static void ipmi_smi_gone(int if_num) 804static void ipmi_smi_gone(int if_num)
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 9c19e5435a11..e3ddbdb85a2f 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -5246,7 +5246,8 @@ int __init stli_init(void)
5246 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), 5246 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
5247 S_IFCHR | S_IRUSR | S_IWUSR, 5247 S_IFCHR | S_IRUSR | S_IWUSR,
5248 "staliomem/%d", i); 5248 "staliomem/%d", i);
5249 class_device_create(istallion_class, MKDEV(STL_SIOMEMMAJOR, i), 5249 class_device_create(istallion_class, NULL,
5250 MKDEV(STL_SIOMEMMAJOR, i),
5250 NULL, "staliomem%d", i); 5251 NULL, "staliomem%d", i);
5251 } 5252 }
5252 5253
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index 2afb9038dbc5..e57260525293 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -805,7 +805,7 @@ static int lp_register(int nr, struct parport *port)
805 if (reset) 805 if (reset)
806 lp_reset(nr); 806 lp_reset(nr);
807 807
808 class_device_create(lp_class, 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, 810 devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO,
811 "printers/%d", nr); 811 "printers/%d", nr);
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index f182752fe918..38be4b0dbd1c 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -920,7 +920,8 @@ static int __init chr_dev_init(void)
920 920
921 mem_class = class_create(THIS_MODULE, "mem"); 921 mem_class = class_create(THIS_MODULE, "mem");
922 for (i = 0; i < ARRAY_SIZE(devlist); i++) { 922 for (i = 0; i < ARRAY_SIZE(devlist); i++) {
923 class_device_create(mem_class, MKDEV(MEM_MAJOR, devlist[i].minor), 923 class_device_create(mem_class, NULL,
924 MKDEV(MEM_MAJOR, devlist[i].minor),
924 NULL, devlist[i].name); 925 NULL, devlist[i].name);
925 devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor), 926 devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor),
926 S_IFCHR | devlist[i].mode, devlist[i].name); 927 S_IFCHR | devlist[i].mode, devlist[i].name);
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index 0c8375165e29..3e4c0414a01a 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -234,7 +234,7 @@ int misc_register(struct miscdevice * misc)
234 } 234 }
235 dev = MKDEV(MISC_MAJOR, misc->minor); 235 dev = MKDEV(MISC_MAJOR, misc->minor);
236 236
237 misc->class = class_device_create(misc_class, dev, misc->dev, 237 misc->class = class_device_create(misc_class, NULL, dev, misc->dev,
238 "%s", misc->name); 238 "%s", misc->name);
239 if (IS_ERR(misc->class)) { 239 if (IS_ERR(misc->class)) {
240 err = PTR_ERR(misc->class); 240 err = PTR_ERR(misc->class);
diff --git a/drivers/char/ppdev.c b/drivers/char/ppdev.c
index 0e22880432bc..306ee0f091a4 100644
--- a/drivers/char/ppdev.c
+++ b/drivers/char/ppdev.c
@@ -752,7 +752,7 @@ static struct file_operations pp_fops = {
752 752
753static void pp_attach(struct parport *port) 753static void pp_attach(struct parport *port)
754{ 754{
755 class_device_create(ppdev_class, MKDEV(PP_MAJOR, port->number), 755 class_device_create(ppdev_class, NULL, MKDEV(PP_MAJOR, port->number),
756 NULL, "parport%d", port->number); 756 NULL, "parport%d", port->number);
757} 757}
758 758
diff --git a/drivers/char/raw.c b/drivers/char/raw.c
index f13e5de02207..30e4cbe16bb0 100644
--- a/drivers/char/raw.c
+++ b/drivers/char/raw.c
@@ -128,7 +128,7 @@ raw_ioctl(struct inode *inode, struct file *filp,
128static void bind_device(struct raw_config_request *rq) 128static void bind_device(struct raw_config_request *rq)
129{ 129{
130 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor)); 130 class_device_destroy(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor));
131 class_device_create(raw_class, MKDEV(RAW_MAJOR, rq->raw_minor), 131 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, rq->raw_minor),
132 NULL, "raw%d", rq->raw_minor); 132 NULL, "raw%d", rq->raw_minor);
133} 133}
134 134
@@ -307,7 +307,7 @@ static int __init raw_init(void)
307 unregister_chrdev_region(dev, MAX_RAW_MINORS); 307 unregister_chrdev_region(dev, MAX_RAW_MINORS);
308 goto error; 308 goto error;
309 } 309 }
310 class_device_create(raw_class, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); 310 class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl");
311 311
312 devfs_mk_cdev(MKDEV(RAW_MAJOR, 0), 312 devfs_mk_cdev(MKDEV(RAW_MAJOR, 0),
313 S_IFCHR | S_IRUGO | S_IWUGO, 313 S_IFCHR | S_IRUGO | S_IWUGO,
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 261a41bf6d02..1758a83327e5 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -437,7 +437,7 @@ scdrv_init(void)
437 continue; 437 continue;
438 } 438 }
439 439
440 class_device_create(snsc_class, dev, NULL, 440 class_device_create(snsc_class, NULL, dev, NULL,
441 "%s", devname); 441 "%s", devname);
442 442
443 ia64_sn_irtr_intr_enable(scd->scd_nasid, 443 ia64_sn_irtr_intr_enable(scd->scd_nasid,
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 951545a6ef2d..1c686414e0a1 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -3095,7 +3095,9 @@ static int __init stl_init(void)
3095 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), 3095 devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
3096 S_IFCHR|S_IRUSR|S_IWUSR, 3096 S_IFCHR|S_IRUSR|S_IWUSR,
3097 "staliomem/%d", i); 3097 "staliomem/%d", i);
3098 class_device_create(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); 3098 class_device_create(stallion_class, NULL,
3099 MKDEV(STL_SIOMEMMAJOR, i), NULL,
3100 "staliomem%d", i);
3099 } 3101 }
3100 3102
3101 stl_serial->owner = THIS_MODULE; 3103 stl_serial->owner = THIS_MODULE;
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index ec78d2f161f7..41a94bc79f67 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -436,7 +436,7 @@ tipar_register(int nr, struct parport *port)
436 goto out; 436 goto out;
437 } 437 }
438 438
439 class_device_create(tipar_class, MKDEV(TIPAR_MAJOR, 439 class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
440 TIPAR_MINOR + nr), NULL, "par%d", nr); 440 TIPAR_MINOR + nr), NULL, "par%d", nr);
441 /* Use devfs, tree: /dev/ticables/par/[0..2] */ 441 /* Use devfs, tree: /dev/ticables/par/[0..2] */
442 err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), 442 err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr),
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e5953f3433f3..f5649a337743 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2728,7 +2728,7 @@ void tty_register_device(struct tty_driver *driver, unsigned index,
2728 pty_line_name(driver, index, name); 2728 pty_line_name(driver, index, name);
2729 else 2729 else
2730 tty_line_name(driver, index, name); 2730 tty_line_name(driver, index, name);
2731 class_device_create(tty_class, dev, device, name); 2731 class_device_create(tty_class, NULL, dev, device, "%s", name);
2732} 2732}
2733 2733
2734/** 2734/**
@@ -2983,14 +2983,14 @@ static int __init tty_init(void)
2983 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) 2983 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0)
2984 panic("Couldn't register /dev/tty driver\n"); 2984 panic("Couldn't register /dev/tty driver\n");
2985 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); 2985 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty");
2986 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); 2986 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty");
2987 2987
2988 cdev_init(&console_cdev, &console_fops); 2988 cdev_init(&console_cdev, &console_fops);
2989 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || 2989 if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) ||
2990 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) 2990 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0)
2991 panic("Couldn't register /dev/console driver\n"); 2991 panic("Couldn't register /dev/console driver\n");
2992 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); 2992 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console");
2993 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); 2993 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console");
2994 2994
2995#ifdef CONFIG_UNIX98_PTYS 2995#ifdef CONFIG_UNIX98_PTYS
2996 cdev_init(&ptmx_cdev, &ptmx_fops); 2996 cdev_init(&ptmx_cdev, &ptmx_fops);
@@ -2998,7 +2998,7 @@ static int __init tty_init(void)
2998 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) 2998 register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0)
2999 panic("Couldn't register /dev/ptmx driver\n"); 2999 panic("Couldn't register /dev/ptmx driver\n");
3000 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); 3000 devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx");
3001 class_device_create(tty_class, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); 3001 class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx");
3002#endif 3002#endif
3003 3003
3004#ifdef CONFIG_VT 3004#ifdef CONFIG_VT
@@ -3007,7 +3007,7 @@ static int __init tty_init(void)
3007 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) 3007 register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0)
3008 panic("Couldn't register /dev/tty0 driver\n"); 3008 panic("Couldn't register /dev/tty0 driver\n");
3009 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); 3009 devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0");
3010 class_device_create(tty_class, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); 3010 class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0");
3011 3011
3012 vty_init(); 3012 vty_init();
3013#endif 3013#endif
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 79c2928a8817..f66c7ad6fd38 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -484,8 +484,10 @@ void vcs_make_devfs(struct tty_struct *tty)
484 devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129), 484 devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129),
485 S_IFCHR|S_IRUSR|S_IWUSR, 485 S_IFCHR|S_IRUSR|S_IWUSR,
486 "vcc/a%u", tty->index + 1); 486 "vcc/a%u", tty->index + 1);
487 class_device_create(vc_class, MKDEV(VCS_MAJOR, tty->index + 1), NULL, "vcs%u", tty->index + 1); 487 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1),
488 class_device_create(vc_class, MKDEV(VCS_MAJOR, tty->index + 129), NULL, "vcsa%u", tty->index + 1); 488 NULL, "vcs%u", tty->index + 1);
489 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129),
490 NULL, "vcsa%u", tty->index + 1);
489} 491}
490void vcs_remove_devfs(struct tty_struct *tty) 492void vcs_remove_devfs(struct tty_struct *tty)
491{ 493{
@@ -503,7 +505,7 @@ int __init vcs_init(void)
503 505
504 devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0"); 506 devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0");
505 devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0"); 507 devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0");
506 class_device_create(vc_class, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); 508 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs");
507 class_device_create(vc_class, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); 509 class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa");
508 return 0; 510 return 0;
509} 511}
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 0aff45fac2e6..a5e104f428f8 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -956,9 +956,9 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
956 state[i].cur_part = 0; 956 state[i].cur_part = 0;
957 for (j = 0; j < MAX_PARTITIONS; ++j) 957 for (j = 0; j < MAX_PARTITIONS; ++j)
958 state[i].part_stat_rwi[j] = VIOT_IDLE; 958 state[i].part_stat_rwi[j] = VIOT_IDLE;
959 class_device_create(tape_class, MKDEV(VIOTAPE_MAJOR, i), NULL, 959 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL,
960 "iseries!vt%d", i); 960 "iseries!vt%d", i);
961 class_device_create(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80), 961 class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
962 NULL, "iseries!nvt%d", i); 962 NULL, "iseries!nvt%d", i);
963 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, 963 devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR,
964 "iseries/vt%d", i); 964 "iseries/vt%d", i);
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 9b41c9bd805f..6f48579799b5 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -45,7 +45,7 @@ struct class_device *hwmon_device_register(struct device *dev)
45 return ERR_PTR(-ENOMEM); 45 return ERR_PTR(-ENOMEM);
46 46
47 id = id & MAX_ID_MASK; 47 id = id & MAX_ID_MASK;
48 cdev = class_device_create(hwmon_class, MKDEV(0,0), dev, 48 cdev = class_device_create(hwmon_class, NULL, MKDEV(0,0), dev,
49 HWMON_ID_FORMAT, id); 49 HWMON_ID_FORMAT, id);
50 50
51 if (IS_ERR(cdev)) 51 if (IS_ERR(cdev))
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 95abe981530d..47f2b832555f 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -4884,9 +4884,9 @@ static int ide_tape_probe(struct device *dev)
4884 4884
4885 idetape_setup(drive, tape, minor); 4885 idetape_setup(drive, tape, minor);
4886 4886
4887 class_device_create(idetape_sysfs_class, 4887 class_device_create(idetape_sysfs_class, NULL,
4888 MKDEV(IDETAPE_MAJOR, minor), dev, "%s", tape->name); 4888 MKDEV(IDETAPE_MAJOR, minor), dev, "%s", tape->name);
4889 class_device_create(idetape_sysfs_class, 4889 class_device_create(idetape_sysfs_class, NULL,
4890 MKDEV(IDETAPE_MAJOR, minor + 128), dev, "n%s", tape->name); 4890 MKDEV(IDETAPE_MAJOR, minor + 128), dev, "n%s", tape->name);
4891 4891
4892 devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), 4892 devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor),
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index e34730c7a874..cbbbe14b8849 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -2361,7 +2361,7 @@ static void dv1394_add_host (struct hpsb_host *host)
2361 2361
2362 ohci = (struct ti_ohci *)host->hostdata; 2362 ohci = (struct ti_ohci *)host->hostdata;
2363 2363
2364 class_device_create(hpsb_protocol_class, MKDEV( 2364 class_device_create(hpsb_protocol_class, NULL, MKDEV(
2365 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)), 2365 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
2366 NULL, "dv1394-%d", id); 2366 NULL, "dv1394-%d", id);
2367 devfs_mk_dir("ieee1394/dv/host%d", id); 2367 devfs_mk_dir("ieee1394/dv/host%d", id);
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 0470f77a9cd1..24411e666b21 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -2912,7 +2912,7 @@ static int __init init_raw1394(void)
2912 2912
2913 hpsb_register_highlevel(&raw1394_highlevel); 2913 hpsb_register_highlevel(&raw1394_highlevel);
2914 2914
2915 if (IS_ERR(class_device_create(hpsb_protocol_class, MKDEV( 2915 if (IS_ERR(class_device_create(hpsb_protocol_class, NULL, MKDEV(
2916 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16), 2916 IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
2917 NULL, RAW1394_DEVICE_NAME))) { 2917 NULL, RAW1394_DEVICE_NAME))) {
2918 ret = -EFAULT; 2918 ret = -EFAULT;
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index 11be9c9c82a8..23911da50154 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -1370,7 +1370,7 @@ static void video1394_add_host (struct hpsb_host *host)
1370 hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id); 1370 hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->host->id);
1371 1371
1372 minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id; 1372 minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id;
1373 class_device_create(hpsb_protocol_class, MKDEV( 1373 class_device_create(hpsb_protocol_class, NULL, MKDEV(
1374 IEEE1394_MAJOR, minor), 1374 IEEE1394_MAJOR, minor),
1375 NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id); 1375 NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
1376 devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor), 1376 devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor),
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index d0f0b0a2edd3..021b8f1d36d3 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1300,7 +1300,7 @@ static int __init ib_ucm_init(void)
1300 goto err_class; 1300 goto err_class;
1301 } 1301 }
1302 1302
1303 class_device_create(ib_ucm_class, IB_UCM_DEV, NULL, "ucm"); 1303 class_device_create(ib_ucm_class, NULL, IB_UCM_DEV, NULL, "ucm");
1304 1304
1305 idr_init(&ctx_id_table); 1305 idr_init(&ctx_id_table);
1306 init_MUTEX(&ctx_id_mutex); 1306 init_MUTEX(&ctx_id_mutex);
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
index 3738d173f9a6..83b694cb8507 100644
--- a/drivers/input/evdev.c
+++ b/drivers/input/evdev.c
@@ -689,7 +689,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
689 689
690 devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), 690 devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
691 S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); 691 S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor);
692 class_device_create(input_class, 692 class_device_create(input_class, NULL,
693 MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), 693 MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
694 dev->dev, "event%d", minor); 694 dev->dev, "event%d", minor);
695 695
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index e0938d1d3ad7..c696fb2a6f99 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -516,7 +516,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
516 516
517 devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), 517 devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
518 S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); 518 S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
519 class_device_create(input_class, 519 class_device_create(input_class, NULL,
520 MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), 520 MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
521 dev->dev, "js%d", minor); 521 dev->dev, "js%d", minor);
522 522
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index c6194a9dd174..d7144e1a9ae3 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -651,7 +651,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
651 651
652 devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), 652 devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
653 S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); 653 S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
654 class_device_create(input_class, 654 class_device_create(input_class, NULL,
655 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), 655 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
656 dev->dev, "mouse%d", minor); 656 dev->dev, "mouse%d", minor);
657 657
@@ -740,7 +740,7 @@ static int __init mousedev_init(void)
740 740
741 devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), 741 devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
742 S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); 742 S_IFCHR|S_IRUGO|S_IWUSR, "input/mice");
743 class_device_create(input_class, 743 class_device_create(input_class, NULL,
744 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice"); 744 MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice");
745 745
746#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX 746#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index 50c63a155156..fbb35c97551b 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -414,7 +414,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
414 S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); 414 S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
415 devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), 415 devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
416 S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); 416 S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
417 class_device_create(input_class, 417 class_device_create(input_class, NULL,
418 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), 418 MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
419 dev->dev, "ts%d", minor); 419 dev->dev, "ts%d", minor);
420 420
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index 04fb606b5ddd..11ae0fddea04 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -1505,7 +1505,7 @@ static int __init capi_init(void)
1505 return PTR_ERR(capi_class); 1505 return PTR_ERR(capi_class);
1506 } 1506 }
1507 1507
1508 class_device_create(capi_class, MKDEV(capi_major, 0), NULL, "capi"); 1508 class_device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi");
1509 devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, 1509 devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR,
1510 "isdn/capi20"); 1510 "isdn/capi20");
1511 1511
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index c0dc1e3fa58b..d2ead1776c16 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -905,5 +905,5 @@ adbdev_init(void)
905 adb_dev_class = class_create(THIS_MODULE, "adb"); 905 adb_dev_class = class_create(THIS_MODULE, "adb");
906 if (IS_ERR(adb_dev_class)) 906 if (IS_ERR(adb_dev_class))
907 return; 907 return;
908 class_device_create(adb_dev_class, MKDEV(ADB_MAJOR, 0), NULL, "adb"); 908 class_device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");
909} 909}
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 4b7adca3e286..477b4fa56430 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -235,7 +235,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
235 S_IFCHR | S_IRUSR | S_IWUSR, 235 S_IFCHR | S_IRUSR | S_IWUSR,
236 "dvb/adapter%d/%s%d", adap->num, dnames[type], id); 236 "dvb/adapter%d/%s%d", adap->num, dnames[type], id);
237 237
238 class_device_create(dvb_class, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), 238 class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
239 NULL, "dvb%d.%s%d", adap->num, dnames[type], id); 239 NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
240 240
241 dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n", 241 dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
diff --git a/drivers/message/i2o/iop.c b/drivers/message/i2o/iop.c
index 176fb573ea26..361da8d1d5e7 100644
--- a/drivers/message/i2o/iop.c
+++ b/drivers/message/i2o/iop.c
@@ -1141,7 +1141,7 @@ int i2o_iop_add(struct i2o_controller *c)
1141 goto iop_reset; 1141 goto iop_reset;
1142 } 1142 }
1143 1143
1144 c->classdev = class_device_create(i2o_controller_class, 0, 1144 c->classdev = class_device_create(i2o_controller_class, NULL, MKDEV(0,0),
1145 &c->device, "iop%d", c->unit); 1145 &c->device, "iop%d", c->unit);
1146 if (IS_ERR(c->classdev)) { 1146 if (IS_ERR(c->classdev)) {
1147 osm_err("%s: could not add controller class\n", c->name); 1147 osm_err("%s: could not add controller class\n", c->name);
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 1ed602a0f24c..c534fd5d95cb 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -24,10 +24,10 @@ static void mtd_notify_add(struct mtd_info* mtd)
24 if (!mtd) 24 if (!mtd)
25 return; 25 return;
26 26
27 class_device_create(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2), 27 class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
28 NULL, "mtd%d", mtd->index); 28 NULL, "mtd%d", mtd->index);
29 29
30 class_device_create(mtd_class, 30 class_device_create(mtd_class, NULL,
31 MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), 31 MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
32 NULL, "mtd%dro", mtd->index); 32 NULL, "mtd%dro", mtd->index);
33} 33}
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 0df7e92b0bf8..d3c9958b00d0 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -863,7 +863,7 @@ static int __init ppp_init(void)
863 err = PTR_ERR(ppp_class); 863 err = PTR_ERR(ppp_class);
864 goto out_chrdev; 864 goto out_chrdev;
865 } 865 }
866 class_device_create(ppp_class, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); 866 class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp");
867 err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), 867 err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0),
868 S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); 868 S_IFCHR|S_IRUSR|S_IWUSR, "ppp");
869 if (err) 869 if (err)
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 7ff814fd65d0..ace68e5bc6c9 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -400,7 +400,7 @@ static int __init cosa_init(void)
400 goto out_chrdev; 400 goto out_chrdev;
401 } 401 }
402 for (i=0; i<nr_cards; i++) { 402 for (i=0; i<nr_cards; i++) {
403 class_device_create(cosa_class, MKDEV(cosa_major, i), 403 class_device_create(cosa_class, NULL, MKDEV(cosa_major, i),
404 NULL, "cosa%d", i); 404 NULL, "cosa%d", i);
405 err = devfs_mk_cdev(MKDEV(cosa_major, i), 405 err = devfs_mk_cdev(MKDEV(cosa_major, i),
406 S_IFCHR|S_IRUSR|S_IWUSR, 406 S_IFCHR|S_IRUSR|S_IWUSR,
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c
index ed0cb1f15b4c..fcaee447d6fe 100644
--- a/drivers/s390/char/tape_class.c
+++ b/drivers/s390/char/tape_class.c
@@ -72,6 +72,7 @@ struct tape_class_device *register_tape_dev(
72 72
73 tcd->class_device = class_device_create( 73 tcd->class_device = class_device_create(
74 tape_class, 74 tape_class,
75 NULL,
75 tcd->char_device->dev, 76 tcd->char_device->dev,
76 device, 77 device,
77 "%s", tcd->device_name 78 "%s", tcd->device_name
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index 491f00c032e8..a107fec4457a 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -787,6 +787,7 @@ vmlogrdr_register_device(struct vmlogrdr_priv_t *priv) {
787 return ret; 787 return ret;
788 } 788 }
789 priv->class_device = class_device_create( 789 priv->class_device = class_device_create(
790 NULL,
790 vmlogrdr_class, 791 vmlogrdr_class,
791 MKDEV(vmlogrdr_major, priv->minor_num), 792 MKDEV(vmlogrdr_major, priv->minor_num),
792 dev, 793 dev,
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index da6e51c7fe69..540147cb51ce 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -936,7 +936,7 @@ static int ch_probe(struct device *dev)
936 if (init) 936 if (init)
937 ch_init_elem(ch); 937 ch_init_elem(ch);
938 938
939 class_device_create(ch_sysfs_class, 939 class_device_create(ch_sysfs_class, NULL,
940 MKDEV(SCSI_CHANGER_MAJOR,ch->minor), 940 MKDEV(SCSI_CHANGER_MAJOR,ch->minor),
941 dev, "s%s", ch->name); 941 dev, "s%s", ch->name);
942 942
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 3f2f2464fa63..0bb60de0bded 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5627,7 +5627,7 @@ static void osst_sysfs_add(dev_t dev, struct device *device, struct osst_tape *
5627 5627
5628 if (!osst_sysfs_valid) return; 5628 if (!osst_sysfs_valid) return;
5629 5629
5630 osst_class_member = class_device_create(osst_sysfs_class, dev, device, "%s", name); 5630 osst_class_member = class_device_create(osst_sysfs_class, NULL, dev, device, "%s", name);
5631 if (IS_ERR(osst_class_member)) { 5631 if (IS_ERR(osst_class_member)) {
5632 printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name); 5632 printk(KERN_WARNING "osst :W: Unable to add sysfs class member %s\n", name);
5633 return; 5633 return;
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index f0d8b4eda5ad..40886e1c9616 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1550,7 +1550,7 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf)
1550 if (sg_sysfs_valid) { 1550 if (sg_sysfs_valid) {
1551 struct class_device * sg_class_member; 1551 struct class_device * sg_class_member;
1552 1552
1553 sg_class_member = class_device_create(sg_sysfs_class, 1553 sg_class_member = class_device_create(sg_sysfs_class, NULL,
1554 MKDEV(SCSI_GENERIC_MAJOR, k), 1554 MKDEV(SCSI_GENERIC_MAJOR, k),
1555 cl_dev->dev, "%s", 1555 cl_dev->dev, "%s",
1556 disk->disk_name); 1556 disk->disk_name);
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index d001c046551b..d45ba4832162 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4375,7 +4375,7 @@ static void do_create_class_files(struct scsi_tape *STp, int dev_num, int mode)
4375 snprintf(name, 10, "%s%s%s", rew ? "n" : "", 4375 snprintf(name, 10, "%s%s%s", rew ? "n" : "",
4376 STp->disk->disk_name, st_formats[i]); 4376 STp->disk->disk_name, st_formats[i]);
4377 st_class_member = 4377 st_class_member =
4378 class_device_create(st_sysfs_class, 4378 class_device_create(st_sysfs_class, NULL,
4379 MKDEV(SCSI_TAPE_MAJOR, 4379 MKDEV(SCSI_TAPE_MAJOR,
4380 TAPE_MINOR(dev_num, mode, rew)), 4380 TAPE_MINOR(dev_num, mode, rew)),
4381 &STp->device->sdev_gendev, "%s", name); 4381 &STp->device->sdev_gendev, "%s", name);
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 487ff672b104..befe0c7f63d1 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1509,7 +1509,7 @@ void usbdev_add(struct usb_device *dev)
1509{ 1509{
1510 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1); 1510 int minor = ((dev->bus->busnum-1) * 128) + (dev->devnum-1);
1511 1511
1512 dev->class_dev = class_device_create(usb_device_class, 1512 dev->class_dev = class_device_create(usb_device_class, NULL,
1513 MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev, 1513 MKDEV(USB_DEVICE_MAJOR, minor), &dev->dev,
1514 "usbdev%d.%d", dev->bus->busnum, dev->devnum); 1514 "usbdev%d.%d", dev->bus->busnum, dev->devnum);
1515 1515
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 65ca131cc44c..78cb4be9529f 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -172,7 +172,9 @@ int usb_register_dev(struct usb_interface *intf,
172 ++temp; 172 ++temp;
173 else 173 else
174 temp = name; 174 temp = name;
175 intf->class_dev = class_device_create(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); 175 intf->class_dev = class_device_create(usb_class, NULL,
176 MKDEV(USB_MAJOR, minor),
177 &intf->dev, "%s", temp);
176 if (IS_ERR(intf->class_dev)) { 178 if (IS_ERR(intf->class_dev)) {
177 spin_lock (&minor_lock); 179 spin_lock (&minor_lock);
178 usb_minors[intf->minor] = NULL; 180 usb_minors[intf->minor] = NULL;
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 1017a97a418b..c3eb66f5a1a4 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -782,7 +782,8 @@ static int usb_register_bus(struct usb_bus *bus)
782 return -E2BIG; 782 return -E2BIG;
783 } 783 }
784 784
785 bus->class_dev = class_device_create(usb_host_class, MKDEV(0,0), bus->controller, "usb_host%d", busnum); 785 bus->class_dev = class_device_create(usb_host_class, NULL, MKDEV(0,0),
786 bus->controller, "usb_host%d", busnum);
786 if (IS_ERR(bus->class_dev)) { 787 if (IS_ERR(bus->class_dev)) {
787 clear_bit(busnum, busmap.busmap); 788 clear_bit(busnum, busmap.busmap);
788 up(&usb_bus_list_lock); 789 up(&usb_bus_list_lock);
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 70be7009f8af..9073be4221a8 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1031,7 +1031,7 @@ register_framebuffer(struct fb_info *fb_info)
1031 break; 1031 break;
1032 fb_info->node = i; 1032 fb_info->node = i;
1033 1033
1034 fb_info->class_device = class_device_create(fb_class, MKDEV(FB_MAJOR, i), 1034 fb_info->class_device = class_device_create(fb_class, NULL, MKDEV(FB_MAJOR, i),
1035 fb_info->device, "fb%d", i); 1035 fb_info->device, "fb%d", i);
1036 if (IS_ERR(fb_info->class_device)) { 1036 if (IS_ERR(fb_info->class_device)) {
1037 /* Not fatal */ 1037 /* Not fatal */