Module Name:    src
Committed By:   riastradh
Date:           Sat Jun 12 12:15:43 UTC 2021

Modified Files:
        src/sys/dev: ipmi.c
        src/sys/external/bsd/drm2/i915drm: intelfb.c

Log Message:
ipmi(4), intelfb(4): Use config_pending_incr/decr.

Don't abuse autoconf's private (and incoherent) dv_flags.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ipmi.c
cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/drm2/i915drm/intelfb.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/ipmi.c
diff -u src/sys/dev/ipmi.c:1.6 src/sys/dev/ipmi.c:1.7
--- src/sys/dev/ipmi.c:1.6	Sun Jun  6 11:48:55 2021
+++ src/sys/dev/ipmi.c	Sat Jun 12 12:15:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipmi.c,v 1.6 2021/06/06 11:48:55 mlelstv Exp $ */
+/*	$NetBSD: ipmi.c,v 1.7 2021/06/12 12:15:43 riastradh Exp $ */
 
 /*
  * Copyright (c) 2019 Michael van Elst
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.6 2021/06/06 11:48:55 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.7 2021/06/12 12:15:43 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -2108,7 +2108,7 @@ ipmi_thread(void *cookie)
 		    SENSOR_REFRESH_RATE);
 	}
 	mutex_exit(&sc->sc_poll_mtx);
-	self->dv_flags &= ~DVF_ATTACH_INPROGRESS;
+	config_pending_decr(self);
 	kthread_exit(0);
 }
 
@@ -2135,7 +2135,7 @@ ipmi_attach(device_t parent, device_t se
 	    &sc->sc_kthread, "%s", device_xname(self)) != 0) {
 		aprint_error_dev(self, "unable to create thread, disabled\n");
 	} else
-		self->dv_flags |= DVF_ATTACH_INPROGRESS;
+		config_pending_incr(self);
 }
 
 static int

Index: src/sys/external/bsd/drm2/i915drm/intelfb.c
diff -u src/sys/external/bsd/drm2/i915drm/intelfb.c:1.17 src/sys/external/bsd/drm2/i915drm/intelfb.c:1.18
--- src/sys/external/bsd/drm2/i915drm/intelfb.c:1.17	Thu Aug 15 00:27:47 2019
+++ src/sys/external/bsd/drm2/i915drm/intelfb.c	Sat Jun 12 12:15:43 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: intelfb.c,v 1.17 2019/08/15 00:27:47 rin Exp $	*/
+/*	$NetBSD: intelfb.c,v 1.18 2021/06/12 12:15:43 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.17 2019/08/15 00:27:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.18 2021/06/12 12:15:43 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/bus.h>
@@ -119,7 +119,7 @@ intelfb_attach(device_t parent, device_t
 		    error);
 		goto fail1;
 	}
-	self->dv_flags |= DVF_ATTACH_INPROGRESS;
+	config_pending_incr(self);
 	sc->sc_scheduled = true;
 
 	/* Success!  */
@@ -189,7 +189,7 @@ intelfb_attach_task(struct i915drmkms_ta
 
 	sc->sc_attached = true;
 out:
-	sc->sc_dev->dv_flags &= ~DVF_ATTACH_INPROGRESS;
+	config_pending_decr(sc->sc_dev);
 }
 
 static bool

Reply via email to