From d08c5d0b9bf708e1d1a93333a11bce5ed9e3105d Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 14 Feb 2004 17:19:43 +0000 Subject: [PATCH] Remove the check which used to protect us against make_dev() being called until DEVFS had a chance to initialize. Since DEVFS is mandatory and things over in that department coincidentally works from without any initialization now, this is safe. --- sys/kern/kern_conf.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 5e3022ed9ae6..21052f10ee37 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -64,8 +64,6 @@ static LIST_HEAD(, cdev) dev_hash[DEVT_HASH]; static LIST_HEAD(, cdev) dev_free; -static int ready_for_devs; - static int free_devt; SYSCTL_INT(_debug, OID_AUTO, free_devt, CTLFLAG_RW, &free_devt, 0, ""); @@ -368,12 +366,6 @@ make_dev(struct cdevsw *devsw, int minor, uid_t uid, gid_t gid, int perms, const } } - if (!ready_for_devs) { - printf("WARNING: Driver mistake: make_dev(%s) called before SI_SUB_DRIVERS\n", - fmt); - /* XXX panic here once drivers are cleaned up */ - } - dev = makedev(devsw->d_maj, minor); if (dev->si_flags & SI_CHEAPCLONE && dev->si_flags & SI_NAMED && @@ -553,14 +545,3 @@ sysctl_devname(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern, OID_AUTO, devname, CTLTYPE_OPAQUE|CTLFLAG_RW|CTLFLAG_ANYBODY, NULL, 0, sysctl_devname, "", "devname(3) handler"); - -/* - * Set ready_for_devs; prior to this point, device creation is not allowed. - */ -static void -dev_set_ready(void *junk) -{ - ready_for_devs = 1; -} - -SYSINIT(dev_ready, SI_SUB_DEVFS, SI_ORDER_FIRST, dev_set_ready, NULL);