scripts: dts: Fix generation of single-value phandle/value array

Put a type check in the offending method.
Now any scalar will be put in a list for
compatibility with following code.

Signed-off-by: Olle Norelius <norelius.olle@gmail.com>
This commit is contained in:
Olle Norelius 2019-09-08 17:05:08 +02:00 committed by Kumar Gala
commit 5a53e21966

View file

@ -333,6 +333,11 @@ def build_cell_array(prop_array):
index = 0
ret_array = []
if isinstance(prop_array, int):
# Work around old code generating an integer for e.g.
# 'pwms = <&foo>'
prop_array = [prop_array]
while index < len(prop_array):
handle = prop_array[index]