summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2015-09-11 20:43:24 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2015-09-11 20:43:24 +0000
commit9453ba85ac547904606060e42f9d41d54bbeac73 (patch)
treee18a05b4bd2fab51a05b5d22f9fd774acb6ec13a /sys/dev
parentc8c3b896f7ff45f8a3f93fe3c4fd1621656b3278 (diff)
back out refcnt for dv_ref, there's too many hand crafted devices all
over the tree. much encouragement from l2k15
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/rd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/rd.c b/sys/dev/rd.c
index 4d50a123196..8ddd5ff0264 100644
--- a/sys/dev/rd.c
+++ b/sys/dev/rd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rd.c,v 1.11 2015/09/11 20:25:32 dlg Exp $ */
+/* $OpenBSD: rd.c,v 1.12 2015/09/11 20:43:23 dlg Exp $ */
/*
* Copyright (c) 2011 Matthew Dempsky <matthew@dempsky.org>
@@ -104,7 +104,7 @@ rdattach(int num)
if (snprintf(sc->sc_dev.dv_xname, sizeof(sc->sc_dev.dv_xname),
"rd%d", i) >= sizeof(sc->sc_dev.dv_xname))
panic("rdattach: device name too long");
- refcnt_init(&sc->sc_dev.dv_ref);
+ sc->sc_dev.dv_ref = 1;
/* Attach it to the device tree. */
rd_cd.cd_devs[i] = sc;