From e539479d4f7500452981ed000fb7946e59c37a90 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 18 Feb 2019 21:35:23 +0100 Subject: [PATCH] scripts/dts: Move prop_names() call into extract_property() Moves it closer to where it's used, and will allow other simplifications in generate_node_defines(). Signed-off-by: Ulf Magnusson --- scripts/dts/extract_dts_includes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/dts/extract_dts_includes.py b/scripts/dts/extract_dts_includes.py index d59bbc3d573..78102bc97e6 100755 --- a/scripts/dts/extract_dts_includes.py +++ b/scripts/dts/extract_dts_includes.py @@ -57,7 +57,7 @@ def extract_string_prop(node_address, key, label): defs[node_address][label] = '"' + reduced[node_address]['props'][key] + '"' -def extract_property(node_compat, node_address, prop, prop_val, names): +def extract_property(node_compat, node_address, prop, prop_val): node = reduced[node_address] yaml_node_compat = get_binding(node_address) def_label = get_node_label(node_address) @@ -101,6 +101,8 @@ def extract_property(node_compat, node_address, prop, prop_val, names): def_label = 'DT_' + def_label + names = prop_names(node, prop) + if prop == 'reg': reg.extract(node_address, names, def_label, 1) elif prop == 'interrupts' or prop == 'interrupts-extended': @@ -153,13 +155,12 @@ def generate_node_defines(node_path): if re.fullmatch(k, c): match = True - extract_property(node_compat, node_path, c, v, - prop_names(node, c)) + extract_property(node_compat, node_path, c, v) # Handle the case that we have a boolean property, but its not # in the dts if not match and v['type'] == 'boolean': - extract_property(node_compat, node_path, k, v, None) + extract_property(node_compat, node_path, k, v) def prop_names(node, prop_name):