Module Name:    src
Committed By:   martin
Date:           Tue Jan 21 18:22:51 UTC 2020

Modified Files:
        src/sys/dev/dm [netbsd-9]: device-mapper.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #641):

        sys/dev/dm/device-mapper.c: revision 1.60

dm(8) doesn't cause problems on suspend, don't block it.
Tested by Matthias Petermann, thanks!


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.40.4.1 src/sys/dev/dm/device-mapper.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.40 src/sys/dev/dm/device-mapper.c:1.40.4.1
--- src/sys/dev/dm/device-mapper.c:1.40	Sat Oct  6 14:59:11 2018
+++ src/sys/dev/dm/device-mapper.c	Tue Jan 21 18:22:51 2020
@@ -1,4 +1,4 @@
-/*        $NetBSD: device-mapper.c,v 1.40 2018/10/06 14:59:11 mlelstv Exp $ */
+/*        $NetBSD: device-mapper.c,v 1.40.4.1 2020/01/21 18:22:51 martin Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -241,9 +241,10 @@ dm_match(device_t parent, cfdata_t match
 static void
 dm_attach(device_t parent, device_t self, void *aux)
 {
-	return;
-}
 
+	if (!pmf_device_register(self, NULL, NULL))
+		aprint_error_dev(self, "couldn't establish power handler\n");
+}
 
 /*
  * dm_detach:
@@ -257,6 +258,8 @@ dm_detach(device_t self, int flags)
 {
 	dm_dev_t *dmv;
 
+	pmf_device_deregister(self);
+
 	/* Detach device from global device list */
 	if ((dmv = dm_dev_detach(self)) == NULL)
 		return ENOENT;

Reply via email to