Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Nothing else handles DVACT_ACTIVATE, so why shou...
details: https://anonhg.NetBSD.org/src/rev/8f8365c219eb
branches: trunk
changeset: 747476:8f8365c219eb
user: dyoung <dyoung%NetBSD.org@localhost>
date: Wed Sep 16 22:44:19 2009 +0000
description:
Nothing else handles DVACT_ACTIVATE, so why should umass(4)? Get
rid of the DVACT_ACTIVATE case in umass_activate(). This eliminates
the only call to config_activate() in the entire tree.
diffstat:
sys/dev/usb/umass.c | 21 +++++++--------------
1 files changed, 7 insertions(+), 14 deletions(-)
diffs (54 lines):
diff -r ec3717722c09 -r 8f8365c219eb sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c Wed Sep 16 21:14:15 2009 +0000
+++ b/sys/dev/usb/umass.c Wed Sep 16 22:44:19 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $ */
+/* $NetBSD: umass.c,v 1.133 2009/09/16 22:44:19 dyoung Exp $ */
/*
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.132 2009/08/23 19:03:18 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.133 2009/09/16 22:44:19 dyoung Exp $");
#include "atapibus.h"
#include "scsibus.h"
@@ -706,30 +706,23 @@
{
struct umass_softc *sc = device_private(dev);
struct umassbus_softc *scbus = sc->bus;
- int rv = 0;
+ int rv;
DPRINTF(UDMASS_USB, ("%s: umass_activate: %d\n",
device_xname(sc->sc_dev), act));
switch (act) {
- case DVACT_ACTIVATE:
- if (scbus == NULL || scbus->sc_child == NULL)
- break;
- rv = config_activate(scbus->sc_child);
- DPRINTF(UDMASS_USB, ("%s: umass activate: child "
- "returned %d\n", device_xname(sc->sc_dev), rv));
- break;
-
case DVACT_DEACTIVATE:
sc->sc_dying = 1;
if (scbus == NULL || scbus->sc_child == NULL)
- break;
+ return 0;
rv = config_deactivate(scbus->sc_child);
DPRINTF(UDMASS_USB, ("%s: umass_deactivate: child "
"returned %d\n", device_xname(sc->sc_dev), rv));
- break;
+ return rv;
+ default:
+ return EOPNOTSUPP;
}
- return (rv);
}
Static void
Home |
Main Index |
Thread Index |
Old Index