summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/udl.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2015-12-11 16:07:01 +0000
committermpi <mpi@openbsd.org>2015-12-11 16:07:01 +0000
commitef89f9e63174a1a2a3a51b4fe036c160c283438f (patch)
treef67e6291b8e0cdf4edc3ffba0686a3a749e3549a /sys/dev/usb/udl.c
parentWe cannot do hooks_find and then hooks_remove because it might have come (diff)
downloadwireguard-openbsd-ef89f9e63174a1a2a3a51b4fe036c160c283438f.tar.xz
wireguard-openbsd-ef89f9e63174a1a2a3a51b4fe036c160c283438f.zip
Replace mountroothook_establish(9) by config_mountroot(9) a narrower API
similar to config_defer(9). ok mikeb@, deraadt@
Diffstat (limited to 'sys/dev/usb/udl.c')
-rw-r--r--sys/dev/usb/udl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index 0ca8f119b20..b353aa27304 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.83 2015/05/02 10:44:29 jsg Exp $ */
+/* $OpenBSD: udl.c,v 1.84 2015/12/11 16:07:02 mpi Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -72,7 +72,7 @@ int udl_debug = 1;
*/
int udl_match(struct device *, void *, void *);
void udl_attach(struct device *, struct device *, void *);
-void udl_attach_hook(void *);
+void udl_attach_hook(struct device *);
int udl_detach(struct device *, int);
int udl_activate(struct device *, int);
@@ -393,16 +393,13 @@ udl_attach(struct device *parent, struct device *self, void *aux)
/*
* Load Huffman table.
*/
- if (rootvp == NULL)
- mountroothook_establish(udl_attach_hook, sc);
- else
- udl_attach_hook(sc);
+ config_mountroot(self, udl_attach_hook);
}
void
-udl_attach_hook(void *arg)
+udl_attach_hook(struct device *self)
{
- struct udl_softc *sc = arg;
+ struct udl_softc *sc = (struct udl_softc *)self;
if (udl_load_huffman(sc) != 0) {
/* compression not possible */