scripts/dts: Treat array always as a list

If the type of property is a 'array' we should generate defines as
if its a list even if theres only a single element in the list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-06-22 15:45:46 -05:00 committed by Anas Nashif
commit 74818bcb49

View file

@ -46,7 +46,7 @@ class DTDefault(DTDirective):
else: else:
prop_values = reduced[node_path]['props'][prop] prop_values = reduced[node_path]['props'][prop]
if prop_type == "string-array": if prop_type == "string-array" or prop_type == "array":
if type(prop_values) is not list: prop_values = [ prop_values, ] if type(prop_values) is not list: prop_values = [ prop_values, ]
if isinstance(prop_values, list): if isinstance(prop_values, list):