From 8488e3e07cdb41500cb8db98bce89f576e53fbb6 Mon Sep 17 00:00:00 2001 From: dyoung Date: Thu, 12 Nov 2009 19:46:01 +0000 Subject: [PATCH] Simplify activation hook. (sc_dying must die!) --- sys/dev/usb/ehci.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 6932ead5abcd..be93f15ae201 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.162 2009/11/01 13:26:50 uebayasi Exp $ */ +/* $NetBSD: ehci.c,v 1.163 2009/11/12 19:46:01 dyoung Exp $ */ /* * Copyright (c) 2004-2008 The NetBSD Foundation, Inc. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.162 2009/11/01 13:26:50 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.163 2009/11/12 19:46:01 dyoung Exp $"); #include "ohci.h" #include "uhci.h" @@ -1102,19 +1102,14 @@ int ehci_activate(device_t self, enum devact act) { struct ehci_softc *sc = device_private(self); - int rv = 0; switch (act) { - case DVACT_ACTIVATE: - return (EOPNOTSUPP); - case DVACT_DEACTIVATE: sc->sc_dying = 1; - if (sc->sc_child != NULL) - rv = config_deactivate(sc->sc_child); - break; + return 0; + default: + return EOPNOTSUPP; } - return (rv); } /*