diff options
author | Simon Glass <sjg@chromium.org> | 2021-07-04 12:19:46 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-07-21 10:27:34 -0600 |
commit | 893142aa3bce28155905594bb054b0f434cafdfd (patch) | |
tree | 6ec2151fe52a2ae61bdc90d4d4e96f1aa55d7888 /tools | |
parent | 1b5fe11d957491a2f53a409b32b1a281c708e2fd (diff) | |
download | u-boot-893142aa3bce28155905594bb054b0f434cafdfd.tar.gz |
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 <sjg@chromium.org>
Reviewed-by: Walter Lozano <walter.lozano@collabora.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dtoc/src_scan.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py index 6c37a71e97..6e8e1ba51a 100644 --- a/tools/dtoc/src_scan.py +++ b/tools/dtoc/src_scan.py @@ -452,8 +452,8 @@ class Scanner: # Collect the compatible string, e.g. 'rockchip,rk3288-grf' compat = None - re_compat = re.compile(r'{\s*.compatible\s*=\s*"(.*)"\s*' - r'(,\s*.data\s*=\s*(\S*))?\s*},') + re_compat = re.compile(r'{\s*\.compatible\s*=\s*"(.*)"\s*' + r'(,\s*\.data\s*=\s*(\S*))?\s*},') # This is a dict of compatible strings that were found: # key: Compatible string, e.g. 'rockchip,rk3288-grf' |