summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordyoung <dyoung@NetBSD.org>2009-04-07 18:15:45 +0000
committerdyoung <dyoung@NetBSD.org>2009-04-07 18:15:45 +0000
commit227c03169aafa562d12d5f3e1686bf3ed801da01 (patch)
tree52d8ef8fe10fba8fbc7b40e9b665774c10d28a8e /sys/dev
parent2e264f40863a2a8087bb4cda9a20c69b3f1af054 (diff)
Detach uhub(4) and usb(4) at shutdown.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhub.c9
-rw-r--r--sys/dev/usb/usb.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index d055260e5f6..152bb7f8d89 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $ */
+/* $NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/*
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.103 2008/08/18 18:03:21 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.104 2009/04/07 18:15:45 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -100,8 +100,9 @@ void uhub_childdet(device_t, device_t);
int uhub_detach(device_t, int);
int uhub_activate(device_t, enum devact);
extern struct cfdriver uhub_cd;
-CFATTACH_DECL2_NEW(uhub, sizeof(struct uhub_softc), uhub_match,
- uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet);
+CFATTACH_DECL3_NEW(uhub, sizeof(struct uhub_softc), uhub_match,
+ uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet,
+ DVF_DETACH_SHUTDOWN);
CFATTACH_DECL2_NEW(uroothub, sizeof(struct uhub_softc), uhub_match,
uhub_attach, uhub_detach, uhub_activate, uhub_rescan, uhub_childdet);
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 2a1d6d621eb..928e08cc148 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $ */
+/* $NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $ */
/*
* Copyright (c) 1998, 2002, 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.115 2008/05/26 18:00:33 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.116 2009/04/07 18:15:45 dyoung Exp $");
#include "opt_compat_netbsd.h"
@@ -162,8 +162,9 @@ static void usb_doattach(device_t);
extern struct cfdriver usb_cd;
-CFATTACH_DECL2_NEW(usb, sizeof(struct usb_softc),
- usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet);
+CFATTACH_DECL3_NEW(usb, sizeof(struct usb_softc),
+ usb_match, usb_attach, usb_detach, usb_activate, NULL, usb_childdet,
+ DVF_DETACH_SHUTDOWN);
USB_MATCH(usb)
{