Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Null suspend/resume handler for uplcom(4).
details: https://anonhg.NetBSD.org/src/rev/657c5a0f090b
branches: trunk
changeset: 338570:657c5a0f090b
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sat May 30 16:44:28 2015 +0000
description:
Null suspend/resume handler for uplcom(4).
diffstat:
sys/dev/usb/uplcom.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (38 lines):
diff -r a8f685300025 -r 657c5a0f090b sys/dev/usb/uplcom.c
--- a/sys/dev/usb/uplcom.c Sat May 30 16:12:33 2015 +0000
+++ b/sys/dev/usb/uplcom.c Sat May 30 16:44:28 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uplcom.c,v 1.74 2014/07/14 12:04:48 ryoon Exp $ */
+/* $NetBSD: uplcom.c,v 1.75 2015/05/30 16:44:28 riastradh Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.74 2014/07/14 12:04:48 ryoon Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.75 2015/05/30 16:44:28 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -418,6 +418,9 @@
sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca,
ucomprint, ucomsubmatch);
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
+
return;
}
@@ -452,6 +455,9 @@
usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
sc->sc_dev);
+ if (rv == 0)
+ pmf_device_deregister(self);
+
return (rv);
}
Home |
Main Index |
Thread Index |
Old Index