Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Don't release the last reference to...



details:   https://anonhg.NetBSD.org/src/rev/13eb1f198044
branches:  trunk
changeset: 956248:13eb1f198044
user:      jdc <jdc%NetBSD.org@localhost>
date:      Sun Oct 25 07:46:53 2020 +0000

description:
Don't release the last reference to the "i2c-child-devices" dictionary in
the v210/v240 patches.
Fixes missing i2c devices there (pointed out by macallan@).
While here, add debug to show when we create the dictionary.

diffstat:

 sys/arch/sparc64/sparc64/ofw_patch.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r e6c3277fd492 -r 13eb1f198044 sys/arch/sparc64/sparc64/ofw_patch.c
--- a/sys/arch/sparc64/sparc64/ofw_patch.c      Sun Oct 25 07:46:05 2020 +0000
+++ b/sys/arch/sparc64/sparc64/ofw_patch.c      Sun Oct 25 07:46:53 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_patch.c,v 1.4 2020/10/24 13:47:53 jdc Exp $ */
+/*     $NetBSD: ofw_patch.c,v 1.5 2020/10/25 07:46:53 jdc Exp $ */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.4 2020/10/24 13:47:53 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_patch.c,v 1.5 2020/10/25 07:46:53 jdc Exp $");
 
 #include <sys/param.h>
 
@@ -63,6 +63,7 @@
 
        cfg = prop_dictionary_get(props, "i2c-child-devices");
        if (!cfg) {
+               DPRINTF(ACDB_PROBE, ("\nCreating new i2c-child-devices\n"));
                cfg = prop_array_create();
                prop_dictionary_set(props, "i2c-child-devices", cfg);
                prop_dictionary_set_bool(props, "i2c-indirect-config", false);
@@ -171,8 +172,6 @@
        add_i2c_device(cfg, "hardware-monitor", "i2c-adm1026", 0x2e, 0);
        /* LM75 at 0x4e */
        add_i2c_device(cfg, "temperature-sensor", "i2c-lm75", 0x4e, 0);
-
-       prop_object_release(cfg);
 }
 
 /* Sensors and GPIO's for E450 and E250 */



Home | Main Index | Thread Index | Old Index