Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c69ef79 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1a715c5c
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -190,8 +190,6 @@ init_socksys(void)
		return ret;
		return ret;
	}
	}


	devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys");

	file = fcheck(ret);
	file = fcheck(ret);
	/* N.B. Is this valid? Suppose the f_ops are in a module ... */
	/* N.B. Is this valid? Suppose the f_ops are in a module ... */
	socksys_file_ops = *file->f_op;
	socksys_file_ops = *file->f_op;
+0 −4
Original line number Original line Diff line number Diff line
@@ -1005,10 +1005,6 @@ int slm_init( void )
	BufferP = SLMBuffer;
	BufferP = SLMBuffer;
	SLMState = IDLE;
	SLMState = IDLE;
	
	
	for (i = 0; i < MAX_SLM; i++) {
		devfs_mk_cdev(MKDEV(ACSI_MAJOR, i),
				S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i);
	}
	return 0;
	return 0;
}
}


+1 −10
Original line number Original line Diff line number Diff line
@@ -676,22 +676,13 @@ static int __init pg_init(void)
	}
	}
	for (unit = 0; unit < PG_UNITS; unit++) {
	for (unit = 0; unit < PG_UNITS; unit++) {
		struct pg *dev = &devices[unit];
		struct pg *dev = &devices[unit];
		if (dev->present) {
		if (dev->present)
			class_device_create(pg_class, NULL, MKDEV(major, unit),
			class_device_create(pg_class, NULL, MKDEV(major, unit),
					NULL, "pg%u", unit);
					NULL, "pg%u", unit);
			err = devfs_mk_cdev(MKDEV(major, unit),
				      S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u",
				      unit);
			if (err) 
				goto out_class;
		}
	}
	}
	err = 0;
	err = 0;
	goto out;
	goto out;


out_class:
	class_device_destroy(pg_class, MKDEV(major, unit));
	class_destroy(pg_class);
out_chrdev:
out_chrdev:
	unregister_chrdev(major, "pg");
	unregister_chrdev(major, "pg");
out:
out:
+0 −16
Original line number Original line Diff line number Diff line
@@ -975,27 +975,11 @@ static int __init pt_init(void)
		if (pt[unit].present) {
		if (pt[unit].present) {
			class_device_create(pt_class, NULL, MKDEV(major, unit),
			class_device_create(pt_class, NULL, MKDEV(major, unit),
					NULL, "pt%d", unit);
					NULL, "pt%d", unit);
			err = devfs_mk_cdev(MKDEV(major, unit),
				      S_IFCHR | S_IRUSR | S_IWUSR,
				      "pt/%d", unit);
			if (err) {
				class_device_destroy(pt_class, MKDEV(major, unit));
				goto out_class;
			}
			class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
			class_device_create(pt_class, NULL, MKDEV(major, unit + 128),
					NULL, "pt%dn", unit);
					NULL, "pt%dn", unit);
			err = devfs_mk_cdev(MKDEV(major, unit + 128),
				      S_IFCHR | S_IRUSR | S_IWUSR,
				      "pt/%dn", unit);
			if (err) {
				class_device_destroy(pt_class, MKDEV(major, unit + 128));
				goto out_class;
			}
		}
		}
	goto out;
	goto out;


out_class:
	class_destroy(pt_class);
out_chrdev:
out_chrdev:
	unregister_chrdev(major, "pt");
	unregister_chrdev(major, "pt");
out:
out:
+0 −8
Original line number Original line Diff line number Diff line
@@ -518,17 +518,9 @@ static int __init dsp56k_init_driver(void)
	}
	}
	class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
	class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");


	err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0),
		      S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k");
	if(err)
		goto out_class;

	printk(banner);
	printk(banner);
	goto out;
	goto out;


out_class:
	class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
	class_destroy(dsp56k_class);
out_chrdev:
out_chrdev:
	unregister_chrdev(DSP56K_MAJOR, "dsp56k");
	unregister_chrdev(DSP56K_MAJOR, "dsp56k");
out:
out:
Loading