diff options
| author | pgoyette <pgoyette@NetBSD.org> | 2015-04-25 22:46:31 +0000 |
|---|---|---|
| committer | pgoyette <pgoyette@NetBSD.org> | 2015-04-25 22:46:31 +0000 |
| commit | a46cf4f44ab3e595bd66416c2eab62fada4eace1 (patch) | |
| tree | a3f9b774fcb7de695a2683df9cf03f70e671da26 /sys/dev/sysmon | |
| parent | ddcd23231fd46f7df9bce700fd2cc2b3af8a256c (diff) | |
Register the sysmon pseudo-device with power management framework so we
can properly suspend the system.
Thanks, mrg, for pointing this out.
Diffstat (limited to 'sys/dev/sysmon')
| -rw-r--r-- | sys/dev/sysmon/sysmon.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sysmon/sysmon.c b/sys/dev/sysmon/sysmon.c index c5f9b75816a..50246aee7c9 100644 --- a/sys/dev/sysmon/sysmon.c +++ b/sys/dev/sysmon/sysmon.c @@ -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 @@ sysmon_init(void) 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 @@ sysmon_fini(void) 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); |
