summaryrefslogtreecommitdiff
path: root/tools/dtoc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-08 20:36:19 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 07:58:17 -0700
commit6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a (patch)
tree11ef9a187ed15da8fe6904ba62a7aaf53b03b814 /tools/dtoc
parentfc0056e8d5ab62adc17455c99864d9a974633a46 (diff)
downloadu-boot-6a4ccad8e0cb42d53ff7016c1d9cd53b87e4347a.tar.gz
patman: Drop tools.ToByte()
This is not needed in Python 3. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc')
-rw-r--r--tools/dtoc/dtb_platdata.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index ee98010423..0ef245397a 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -110,7 +110,7 @@ def get_value(ftype, value):
return '%#x' % fdt_util.fdt32_to_cpu(value)
elif ftype == fdt.Type.BYTE:
ch = value[0]
- return '%#x' % ord(ch) if type(ch) == str else ch
+ return '%#x' % (ord(ch) if type(ch) == str else ch)
elif ftype == fdt.Type.STRING:
# Handle evil ACPI backslashes by adding another backslash before them.
# So "\\_SB.GPO0" in the device tree effectively stays like that in C