aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dtoc/dtb_platdata.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/dtoc/dtb_platdata.py b/tools/dtoc/dtb_platdata.py
index 9923892dc35..1f85343a9fd 100644
--- a/tools/dtoc/dtb_platdata.py
+++ b/tools/dtoc/dtb_platdata.py
@@ -46,6 +46,9 @@ VAL_PREFIX = 'dtv_'
def conv_name_to_c(name):
"""Convert a device-tree name to a C identifier
+ This uses multiple replace() calls instead of re.sub() since it is faster
+ (400ms for 1m calls versus 1000ms for the 're' version).
+
Args:
name: Name to convert
Return: