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.
This commit is contained in:
Poul-Henning Kamp 2004-02-14 17:19:43 +00:00
parent f775748a9e
commit d08c5d0b9b

View File

@ -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);