Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon Register the sysmon pseudo-device with power ...
details: https://anonhg.NetBSD.org/src/rev/16ea5f511ba5
branches: trunk
changeset: 337741:16ea5f511ba5
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Apr 25 22:46:31 2015 +0000
description:
Register the sysmon pseudo-device with power management framework so we
can properly suspend the system.
Thanks, mrg, for pointing this out.
diffstat:
sys/dev/sysmon/sysmon.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 1f367611142d -r 16ea5f511ba5 sys/dev/sysmon/sysmon.c
--- a/sys/dev/sysmon/sysmon.c Sat Apr 25 22:03:07 2015 +0000
+++ b/sys/dev/sysmon/sysmon.c Sat Apr 25 22:46:31 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $ */
+/* $NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $ */
/*-
* Copyright (c) 2000 Zembu Labs, Inc.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.22 2015/04/25 22:46:31 pgoyette Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -397,6 +397,10 @@
error = ENODEV;
}
+ if (pmf_device_register(sysmon_dev, NULL, NULL))
+ aprintf_error("%s: failed to register with pmf\n",
+ sysmon_cd.cd_name);
+
return error;
}
@@ -413,6 +417,7 @@
error = EBUSY;
else {
+ pmf_device_deregister(sysmon_dev);
config_detach(sysmon_dev, 0);
devsw_detach(NULL, &sysmon_cdevsw);
config_cfattach_detach(sysmon_cd.cd_name, &sysmon_ca);
Home |
Main Index |
Thread Index |
Old Index