diff options
author | ed <ed@FreeBSD.org> | 2008-09-26 14:19:52 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2008-09-26 14:19:52 +0000 |
commit | 4212d51a7da942b0c717c9965552c9549d90de08 (patch) | |
tree | f45f750affeffb39e162226343b0db9a110c42ce /sys/i386/acpica | |
parent | 0a873f95fe4b1e8d5d3f6ead357fca828948b3ac (diff) | |
download | FreeBSD-src-4212d51a7da942b0c717c9965552c9549d90de08.zip FreeBSD-src-4212d51a7da942b0c717c9965552c9549d90de08.tar.gz |
Remove unit2minor() use from kernel code.
When I changed kern_conf.c three months ago I made device unit numbers
equal to (unneeded) device minor numbers. We used to require
bitshifting, because there were eight bits in the middle that were
reserved for a device major number. Not very long after I turned
dev2unit(), minor(), unit2minor() and minor2unit() into macro's.
The unit2minor() and minor2unit() macro's were no-ops.
We'd better not remove these four macro's from the kernel, because there
is a lot of (external) code that may still depend on them. For now it's
harmless to remove all invocations of unit2minor() and minor2unit().
Reviewed by: kib
Diffstat (limited to 'sys/i386/acpica')
-rw-r--r-- | sys/i386/acpica/acpi_machdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index 9d24e62..8d130fb 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -235,10 +235,10 @@ apm_clone(void *arg, struct ucred *cred, char *name, int namelen, unit = -1; if (clone_create(&apm_clones, &apm_cdevsw, &unit, dev, 0)) { if (ctl_dev) { - *dev = make_dev(&apm_cdevsw, unit2minor(unit), + *dev = make_dev(&apm_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0660, "apmctl%d", unit); } else { - *dev = make_dev(&apm_cdevsw, unit2minor(unit), + *dev = make_dev(&apm_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0664, "apm%d", unit); } if (*dev != NULL) { |