Module Name:    src
Committed By:   snj
Date:           Thu Jul 30 15:51:58 UTC 2015

Modified Files:
        src/sys/dev/usb [netbsd-7]: uplcom.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #908):
        sys/dev/usb/uplcom.c: revision 1.75
Null suspend/resume handler for uplcom(4).


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.2.1 src/sys/dev/usb/uplcom.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/uplcom.c
diff -u src/sys/dev/usb/uplcom.c:1.74 src/sys/dev/usb/uplcom.c:1.74.2.1
--- src/sys/dev/usb/uplcom.c:1.74	Mon Jul 14 12:04:48 2014
+++ src/sys/dev/usb/uplcom.c	Thu Jul 30 15:51:58 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uplcom.c,v 1.74 2014/07/14 12:04:48 ryoon Exp $	*/
+/*	$NetBSD: uplcom.c,v 1.74.2.1 2015/07/30 15:51:58 snj 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.74.2.1 2015/07/30 15:51:58 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -418,6 +418,9 @@ uplcom_attach(device_t parent, device_t 
 	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 @@ uplcom_detach(device_t self, int flags)
 	usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
 			   sc->sc_dev);
 
+	if (rv == 0)
+		pmf_device_deregister(self);
+
 	return (rv);
 }
 

Reply via email to