Skip to content

Commit 7c69ef7

Browse files
committed
[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>
1 parent 1a715c5 commit 7c69ef7

35 files changed

Lines changed: 8 additions & 202 deletions

File tree

‎arch/sparc64/solaris/socksys.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ init_socksys(void)
190190
return ret;
191191
}
192192

193-
devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys");
194-
195193
file = fcheck(ret);
196194
/* N.B. Is this valid? Suppose the f_ops are in a module ... */
197195
socksys_file_ops = *file->f_op;

‎drivers/block/acsi_slm.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,10 +1005,6 @@ int slm_init( void )
10051005
BufferP = SLMBuffer;
10061006
SLMState = IDLE;
10071007

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-
}
10121008
return 0;
10131009
}
10141010

‎drivers/block/paride/pg.c‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -676,22 +676,13 @@ static int __init pg_init(void)
676676
}
677677
for (unit = 0; unit < PG_UNITS; unit++) {
678678
struct pg *dev = &devices[unit];
679-
if (dev->present) {
679+
if (dev->present)
680680
class_device_create(pg_class, NULL, MKDEV(major, unit),
681681
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-
}
688682
}
689683
err = 0;
690684
goto out;
691685

692-
out_class:
693-
class_device_destroy(pg_class, MKDEV(major, unit));
694-
class_destroy(pg_class);
695686
out_chrdev:
696687
unregister_chrdev(major, "pg");
697688
out:

‎drivers/block/paride/pt.c‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -975,27 +975,11 @@ static int __init pt_init(void)
975975
if (pt[unit].present) {
976976
class_device_create(pt_class, NULL, MKDEV(major, unit),
977977
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-
}
985978
class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
986979
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-
}
994980
}
995981
goto out;
996982

997-
out_class:
998-
class_destroy(pt_class);
999983
out_chrdev:
1000984
unregister_chrdev(major, "pt");
1001985
out:

‎drivers/char/dsp56k.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -518,17 +518,9 @@ static int __init dsp56k_init_driver(void)
518518
}
519519
class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
520520

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-
526521
printk(banner);
527522
goto out;
528523

529-
out_class:
530-
class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
531-
class_destroy(dsp56k_class);
532524
out_chrdev:
533525
unregister_chrdev(DSP56K_MAJOR, "dsp56k");
534526
out:

‎drivers/char/dtlk.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,6 @@ static int __init dtlk_init(void)
337337
if (dtlk_dev_probe() == 0)
338338
printk(", MAJOR %d\n", dtlk_major);
339339

340-
devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR),
341-
S_IFCHR | S_IRUSR | S_IWUSR, "dtlk");
342-
343340
init_timer(&dtlk_timer);
344341
dtlk_timer.function = dtlk_timer_tick;
345342
init_waitqueue_head(&dtlk_process_list);

‎drivers/char/ftape/zftape/zftape-init.c‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -332,29 +332,11 @@ KERN_INFO
332332
zft_class = class_create(THIS_MODULE, "zft");
333333
for (i = 0; i < 4; i++) {
334334
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);
338335
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);
342336
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);
346337
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);
350338
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);
354339
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);
358340
}
359341

360342
#ifdef CONFIG_ZFT_COMPRESSOR

‎drivers/char/ip2/ip2main.c‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -724,26 +724,9 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
724724
class_device_create(ip2_class, NULL,
725725
MKDEV(IP2_IPL_MAJOR, 4 * i),
726726
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-
736727
class_device_create(ip2_class, NULL,
737728
MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
738729
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-
}
747730

748731
for ( box = 0; box < ABS_MAX_BOXES; ++box )
749732
{

‎drivers/char/ipmi/ipmi_devintf.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -804,9 +804,6 @@ static void ipmi_new_smi(int if_num, struct device *device)
804804
dev_t dev = MKDEV(ipmi_major, if_num);
805805
struct ipmi_reg_list *entry;
806806

807-
devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
808-
"ipmidev/%d", if_num);
809-
810807
entry = kmalloc(sizeof(*entry), GFP_KERNEL);
811808
if (!entry) {
812809
printk(KERN_ERR "ipmi_devintf: Unable to create the"

‎drivers/char/istallion.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5214,14 +5214,10 @@ int __init stli_init(void)
52145214
"device\n");
52155215

52165216
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++)
52215218
class_device_create(istallion_class, NULL,
52225219
MKDEV(STL_SIOMEMMAJOR, i),
52235220
NULL, "staliomem%d", i);
5224-
}
52255221

52265222
/*
52275223
* Set up the tty driver structure and register us as a driver.

0 commit comments

Comments
 (0)