Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm Convert to new proplib api



details:   https://anonhg.NetBSD.org/src/rev/70af0474285c
branches:  trunk
changeset: 934916:70af0474285c
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Jun 20 15:48:19 2020 +0000

description:
Convert to new proplib api

diffstat:

 sys/arch/arm/amlogic/meson_platform.c |   8 +++-----
 sys/arch/arm/nvidia/tegra_platform.c  |  12 ++++++------
 2 files changed, 9 insertions(+), 11 deletions(-)

diffs (76 lines):

diff -r 2b8449376a6f -r 70af0474285c sys/arch/arm/amlogic/meson_platform.c
--- a/sys/arch/arm/amlogic/meson_platform.c     Sat Jun 20 15:45:22 2020 +0000
+++ b/sys/arch/arm/amlogic/meson_platform.c     Sat Jun 20 15:48:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: meson_platform.c,v 1.13 2019/08/13 09:56:08 skrll Exp $ */
+/* $NetBSD: meson_platform.c,v 1.14 2020/06/20 15:48:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -33,7 +33,7 @@
 #include "arml2cc.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.13 2019/08/13 09:56:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: meson_platform.c,v 1.14 2020/06/20 15:48:19 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -189,10 +189,8 @@
                uint8_t enaddr[ETHER_ADDR_LEN];
                if (get_bootconf_option(boot_args, "awge0.mac-address",
                    BOOTOPT_TYPE_MACADDR, enaddr)) {
-                       prop_data_t pd = prop_data_create_data(enaddr,
+                       prop_dictionary_set_data(dict, "mac-address", enaddr,
                            sizeof(enaddr));
-                       prop_dictionary_set(dict, "mac-address", pd);
-                       prop_object_release(pd);
                }
        }
 
diff -r 2b8449376a6f -r 70af0474285c sys/arch/arm/nvidia/tegra_platform.c
--- a/sys/arch/arm/nvidia/tegra_platform.c      Sat Jun 20 15:45:22 2020 +0000
+++ b/sys/arch/arm/nvidia/tegra_platform.c      Sat Jun 20 15:48:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_platform.c,v 1.20 2019/01/03 12:52:40 jmcneill Exp $ */
+/* $NetBSD: tegra_platform.c,v 1.21 2020/06/20 15:48:19 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -34,7 +34,7 @@
 #include "ukbd.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.20 2019/01/03 12:52:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_platform.c,v 1.21 2020/06/20 15:48:19 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -161,23 +161,23 @@
        if (device_is_a(self, "tegradrm")) {
                const char *video = get_bootconf_string(boot_args, "video");
                if (video)
-                       prop_dictionary_set_cstring(dict, "HDMI-A-1", video);
+                       prop_dictionary_set_string(dict, "HDMI-A-1", video);
                if (match_bootconf_option(boot_args, "hdmi.forcemode", "dvi"))
                        prop_dictionary_set_bool(dict, "force-dvi", true);
        }
 
        if (device_is_a(self, "tegracec"))
-               prop_dictionary_set_cstring(dict, "hdmi-device", "tegradrm0");
+               prop_dictionary_set_string(dict, "hdmi-device", "tegradrm0");
 
        if (device_is_a(self, "nouveau")) {
                const char *config = get_bootconf_string(boot_args,
                    "nouveau.config");
                if (config)
-                       prop_dictionary_set_cstring(dict, "config", config);
+                       prop_dictionary_set_string(dict, "config", config);
                const char *debug = get_bootconf_string(boot_args,
                    "nouveau.debug");
                if (debug)
-                       prop_dictionary_set_cstring(dict, "debug", debug);
+                       prop_dictionary_set_string(dict, "debug", debug);
        }
 
        if (device_is_a(self, "tegrapcie")) {



Home | Main Index | Thread Index | Old Index