Module Name:    src
Committed By:   mlelstv
Date:           Wed Jun 29 15:58:12 UTC 2022

Modified Files:
        src/sys/dev/ic: apple_smc_fan.c apple_smc_temp.c

Log Message:
Don't unregister sensors twice.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/apple_smc_fan.c \
    src/sys/dev/ic/apple_smc_temp.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/apple_smc_fan.c
diff -u src/sys/dev/ic/apple_smc_fan.c:1.5 src/sys/dev/ic/apple_smc_fan.c:1.6
--- src/sys/dev/ic/apple_smc_fan.c:1.5	Thu Apr 23 23:23:00 2015
+++ src/sys/dev/ic/apple_smc_fan.c	Wed Jun 29 15:58:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: apple_smc_fan.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $	*/
+/*	$NetBSD: apple_smc_fan.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $	*/
 
 /*
  * Apple System Management Controller: Fans
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apple_smc_fan.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_smc_fan.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -218,7 +218,6 @@ apple_smc_fan_detach(device_t self, int 
 	/* If we registered with sysmon_envsys, unregister.  */
 	if (sc->sc_sme != NULL) {
 		sysmon_envsys_unregister(sc->sc_sme);
-		sc->sc_sme = NULL;
 
 		KASSERT(sc->sc_fans != NULL);
 		KASSERT(sc->sc_nfans > 0);
Index: src/sys/dev/ic/apple_smc_temp.c
diff -u src/sys/dev/ic/apple_smc_temp.c:1.5 src/sys/dev/ic/apple_smc_temp.c:1.6
--- src/sys/dev/ic/apple_smc_temp.c:1.5	Thu Apr 23 23:23:00 2015
+++ src/sys/dev/ic/apple_smc_temp.c	Wed Jun 29 15:58:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: apple_smc_temp.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $	*/
+/*	$NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $	*/
 
 /*
  * Apple System Management Controller: Temperature Sensors
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.5 2015/04/23 23:23:00 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apple_smc_temp.c,v 1.6 2022/06/29 15:58:12 mlelstv Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -153,7 +153,6 @@ apple_smc_temp_detach(device_t self, int
 	/* If we registered with sysmon_envsys, unregister.  */
 	if (sc->sc_sme != NULL) {
 		sysmon_envsys_unregister(sc->sc_sme);
-		sc->sc_sme = NULL;
 
 		KASSERT(sc->sc_sensors != NULL);
 		KASSERT(sc->sc_nsensors > 0);

Reply via email to