Skip to content

Commit 947906d

Browse files
pdgendtfabiobaltieri
authored andcommitted
scripts: build: gen_kobject_list.py check _driver_api suffix
Raise an exceptionif _driver_api suffix is missing from subsystem name. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 7ad76e5 commit 947906d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/build/gen_kobject_list.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ def kobject_to_enum(kobj):
138138
net_sockets = [ ]
139139

140140
def subsystem_to_enum(subsys):
141+
if not subsys.endswith("_driver_api"):
142+
raise Exception("__subsystem is missing _driver_api suffix: (%s)" % subsys)
143+
141144
return "K_OBJ_DRIVER_" + subsys[:-11].upper()
142145

143146
# --- debug stuff ---

0 commit comments

Comments
 (0)