Module Name: src
Committed By: msaitoh
Date: Fri Nov 30 05:49:23 UTC 2018
Modified Files:
src/sys/dev/ic: nslm7x.c
Log Message:
Use pmf_device_{register,deregister}().
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sys/dev/ic/nslm7x.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/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.71 src/sys/dev/ic/nslm7x.c:1.72
--- src/sys/dev/ic/nslm7x.c:1.71 Wed Mar 7 09:25:56 2018
+++ src/sys/dev/ic/nslm7x.c Fri Nov 30 05:49:23 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $ */
+/* $NetBSD: nslm7x.c,v 1.72 2018/11/30 05:49:23 msaitoh Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.71 2018/03/07 09:25:56 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.72 2018/11/30 05:49:23 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2270,6 +2270,9 @@ lm_attach(struct lm_softc *lmsc)
"unable to register with sysmon\n");
sysmon_envsys_destroy(lmsc->sc_sme);
}
+ if (!pmf_device_register(lmsc->sc_dev, NULL, NULL))
+ aprint_error_dev(lmsc->sc_dev,
+ "couldn't establish power handler\n");
}
/*
@@ -2282,6 +2285,7 @@ lm_detach(struct lm_softc *lmsc)
callout_halt(&lmsc->sc_callout, NULL);
callout_destroy(&lmsc->sc_callout);
sysmon_envsys_unregister(lmsc->sc_sme);
+ pmf_device_deregister(lmsc->sc_dev);
}
static void