Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/8d1087a61a7b
branches:  trunk
changeset: 972876:8d1087a61a7b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri Jun 12 14:52:11 2020 +0000

description:
Update for proplib(3) API changes.

diffstat:

 sys/dev/ofw/ofw_subr.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 4401c81e684f -r 8d1087a61a7b sys/dev/ofw/ofw_subr.c
--- a/sys/dev/ofw/ofw_subr.c    Fri Jun 12 14:37:51 2020 +0000
+++ b/sys/dev/ofw/ofw_subr.c    Fri Jun 12 14:52:11 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofw_subr.c,v 1.35 2020/06/11 02:39:30 thorpej Exp $    */
+/*     $NetBSD: ofw_subr.c,v 1.36 2020/06/12 14:52:11 thorpej Exp $    */
 
 /*
  * Copyright 1998
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.35 2020/06/11 02:39:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.36 2020/06/12 14:52:11 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -393,19 +393,14 @@
 of_to_dataprop(prop_dictionary_t dict, int node, const char *ofname,
     const char *propname)
 {
-       prop_data_t data;
        int len;
        uint8_t prop[256];
-       boolean_t res;
 
        len = OF_getprop(node, ofname, prop, 256);
        if (len < 1)
                return FALSE;
 
-       data = prop_data_create_data(prop, len);
-       res = prop_dictionary_set(dict, propname, data);
-       prop_object_release(data);
-       return res;
+       return prop_dictionary_set_data(dict, propname, prop, len);
 }
 
 /*



Home | Main Index | Thread Index | Old Index