Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Attach to PMF.
details: https://anonhg.NetBSD.org/src/rev/dc138c61da7c
branches: trunk
changeset: 781825:dc138c61da7c
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Wed Oct 03 07:07:04 2012 +0000
description:
Attach to PMF.
diffstat:
sys/dev/usb/umodem.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r af4bc014b0b7 -r dc138c61da7c sys/dev/usb/umodem.c
--- a/sys/dev/usb/umodem.c Wed Oct 03 07:05:51 2012 +0000
+++ b/sys/dev/usb/umodem.c Wed Oct 03 07:07:04 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $ */
+/* $NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.64 2012/06/14 05:14:41 blymn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.65 2012/10/03 07:07:04 mlelstv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -121,6 +121,9 @@
uca.methods = &umodem_methods;
uca.info = NULL;
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler");
+
if (umodem_common_attach(self, sc, uaa, &uca))
return;
return;
@@ -139,5 +142,7 @@
{
struct umodem_softc *sc = device_private(self);
+ pmf_device_deregister(self);
+
return umodem_common_detach(sc, flags);
}
Home |
Main Index |
Thread Index |
Old Index