Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys ipmi(4), intelfb(4): Use config_pending_incr/decr.



details:   https://anonhg.NetBSD.org/src/rev/ad988ee4045b
branches:  trunk
changeset: 1021648:ad988ee4045b
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jun 12 12:15:43 2021 +0000

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

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

diffstat:

 sys/dev/ipmi.c                          |  8 ++++----
 sys/external/bsd/drm2/i915drm/intelfb.c |  8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r ae82359e5fb3 -r ad988ee4045b sys/dev/ipmi.c
--- a/sys/dev/ipmi.c    Sat Jun 12 12:14:13 2021 +0000
+++ b/sys/dev/ipmi.c    Sat Jun 12 12:15:43 2021 +0000
@@ -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 @@
                    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 @@
            &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
diff -r ae82359e5fb3 -r ad988ee4045b sys/external/bsd/drm2/i915drm/intelfb.c
--- a/sys/external/bsd/drm2/i915drm/intelfb.c   Sat Jun 12 12:14:13 2021 +0000
+++ b/sys/external/bsd/drm2/i915drm/intelfb.c   Sat Jun 12 12:15:43 2021 +0000
@@ -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 @@
                    error);
                goto fail1;
        }
-       self->dv_flags |= DVF_ATTACH_INPROGRESS;
+       config_pending_incr(self);
        sc->sc_scheduled = true;
 
        /* Success!  */
@@ -189,7 +189,7 @@
 
        sc->sc_attached = true;
 out:
-       sc->sc_dev->dv_flags &= ~DVF_ATTACH_INPROGRESS;
+       config_pending_decr(sc->sc_dev);
 }
 
 static bool



Home | Main Index | Thread Index | Old Index