summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dtoc/src_scan.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dtoc/src_scan.py b/tools/dtoc/src_scan.py
index a275032179..bb22b0b64f 100644
--- a/tools/dtoc/src_scan.py
+++ b/tools/dtoc/src_scan.py
@@ -331,7 +331,7 @@ class Scanner:
# Collect the driver name and associated Driver
driver = None
- re_driver = re.compile(r'UCLASS_DRIVER\((.*)\)')
+ re_driver = re.compile(r'^UCLASS_DRIVER\((.*)\)')
# Collect the uclass ID, e.g. 'UCLASS_SPI'
re_id = re.compile(r'\s*\.id\s*=\s*(UCLASS_[A-Z0-9_]+)')
@@ -427,7 +427,7 @@ class Scanner:
# Collect the driver info
driver = None
- re_driver = re.compile(r'U_BOOT_DRIVER\((.*)\)')
+ re_driver = re.compile(r'^U_BOOT_DRIVER\((.*)\)')
# Collect the uclass ID, e.g. 'UCLASS_SPI'
re_id = re.compile(r'\s*\.id\s*=\s*(UCLASS_[A-Z0-9_]+)')