summaryrefslogtreecommitdiffstats
path: root/sys/dev/led
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-09-26 14:19:52 +0000
committered <ed@FreeBSD.org>2008-09-26 14:19:52 +0000
commit4212d51a7da942b0c717c9965552c9549d90de08 (patch)
treef45f750affeffb39e162226343b0db9a110c42ce /sys/dev/led
parent0a873f95fe4b1e8d5d3f6ead357fca828948b3ac (diff)
downloadFreeBSD-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/dev/led')
-rw-r--r--sys/dev/led/led.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/led/led.c b/sys/dev/led/led.c
index d086f4e..1d902d5 100644
--- a/sys/dev/led/led.c
+++ b/sys/dev/led/led.c
@@ -257,7 +257,7 @@ led_create_state(led_t *func, void *priv, char const *name, int state)
sc->unit = alloc_unr(led_unit);
sc->private = priv;
sc->func = func;
- sc->dev = make_dev(&led_cdevsw, unit2minor(sc->unit),
+ sc->dev = make_dev(&led_cdevsw, sc->unit,
UID_ROOT, GID_WHEEL, 0600, "led/%s", name);
sx_xunlock(&led_sx);
OpenPOWER on IntegriCloud