Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Update for proplib(3) API changes.



details:   https://anonhg.NetBSD.org/src/rev/cdd0934ca6f4
branches:  trunk
changeset: 934430:cdd0934ca6f4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 12 03:41:57 2020 +0000

description:
Update for proplib(3) API changes.

diffstat:

 sys/arch/sparc64/dev/jbus-i2c.c    |  12 +++++-------
 sys/arch/sparc64/dev/pcfiic_ebus.c |  11 ++++-------
 2 files changed, 9 insertions(+), 14 deletions(-)

diffs (74 lines):

diff -r 92c63ebf7c15 -r cdd0934ca6f4 sys/arch/sparc64/dev/jbus-i2c.c
--- a/sys/arch/sparc64/dev/jbus-i2c.c   Fri Jun 12 03:32:30 2020 +0000
+++ b/sys/arch/sparc64/dev/jbus-i2c.c   Fri Jun 12 03:41:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jbus-i2c.c,v 1.4 2019/12/22 23:23:31 thorpej Exp $     */
+/*     $NetBSD: jbus-i2c.c,v 1.5 2020/06/12 03:41:57 thorpej Exp $     */
 
 /*
  * Copyright (c) 2018 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: jbus-i2c.c,v 1.4 2019/12/22 23:23:31 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: jbus-i2c.c,v 1.5 2020/06/12 03:41:57 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -136,7 +136,6 @@
        struct i2cbus_attach_args iba;
        prop_array_t cfg;
        prop_dictionary_t dev;
-       prop_data_t data;
        prop_dictionary_t dict = device_properties(sc->sc_dev);
        int devs, regs[2], addr;
        char name[64], compat[256];
@@ -167,10 +166,9 @@
                addr = (regs[1] & 0xff) >> 1;
                DPRINTF("-> %s@%d,%x\n", name, regs[0], addr);
                dev = prop_dictionary_create();
-               prop_dictionary_set_cstring(dev, "name", name);
-               data = prop_data_create_data(compat, strlen(compat)+1);
-               prop_dictionary_set(dev, "compatible", data);
-               prop_object_release(data);
+               prop_dictionary_set_string(dev, "name", name);
+               prop_dictionary_set_data(dev, "compatible", compat,
+                   strlen(compat)+1);
                prop_dictionary_set_uint32(dev, "addr", addr);
                prop_dictionary_set_uint64(dev, "cookie", devs);
                prop_array_add(cfg, dev);
diff -r 92c63ebf7c15 -r cdd0934ca6f4 sys/arch/sparc64/dev/pcfiic_ebus.c
--- a/sys/arch/sparc64/dev/pcfiic_ebus.c        Fri Jun 12 03:32:30 2020 +0000
+++ b/sys/arch/sparc64/dev/pcfiic_ebus.c        Fri Jun 12 03:41:57 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcfiic_ebus.c,v 1.5 2016/01/03 17:32:17 jdc Exp $      */
+/*     $NetBSD: pcfiic_ebus.c,v 1.6 2020/06/12 03:41:57 thorpej Exp $  */
 /*     $OpenBSD: pcfiic_ebus.c,v 1.13 2008/06/08 03:07:40 deraadt Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pcfiic_ebus.c,v 1.5 2016/01/03 17:32:17 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pcfiic_ebus.c,v 1.6 2020/06/12 03:41:57 thorpej Exp $");
 
 /*
  * Device specific driver for the EBus i2c devices found on some sun4u
@@ -187,13 +187,10 @@
        int node)
 {
        prop_dictionary_t dev;
-       prop_data_t data;
 
        dev = prop_dictionary_create();
-       prop_dictionary_set_cstring(dev, "name", name);
-       data = prop_data_create_data(compat, strlen(compat)+1);
-       prop_dictionary_set(dev, "compatible", data);
-       prop_object_release(data);
+       prop_dictionary_set_string(dev, "name", name);
+       prop_dictionary_set_data(dev, "compatible", compat, strlen(compat)+1);
        prop_dictionary_set_uint32(dev, "addr", addr);
        prop_dictionary_set_uint64(dev, "cookie", node);
        prop_array_add(c, dev);



Home | Main Index | Thread Index | Old Index