Commit 893142aa authored by Simon Glass's avatar Simon Glass
Browse files

dtoc: Correct the re_compat regular expression



This expects a . before the field name (.e.g '.compatible = ...) but
presently accepts anything at all. Fix it.
Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent 1b5fe11d
...@@ -452,8 +452,8 @@ class Scanner: ...@@ -452,8 +452,8 @@ class Scanner:
# Collect the compatible string, e.g. 'rockchip,rk3288-grf' # Collect the compatible string, e.g. 'rockchip,rk3288-grf'
compat = None compat = None
re_compat = re.compile(r'{\s*.compatible\s*=\s*"(.*)"\s*' re_compat = re.compile(r'{\s*\.compatible\s*=\s*"(.*)"\s*'
r'(,\s*.data\s*=\s*(\S*))?\s*},') r'(,\s*\.data\s*=\s*(\S*))?\s*},')
# This is a dict of compatible strings that were found: # This is a dict of compatible strings that were found:
# key: Compatible string, e.g. 'rockchip,rk3288-grf' # key: Compatible string, e.g. 'rockchip,rk3288-grf'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment