dts: edtlib: Simplify 'category: optional' code in Device._prop_val()
Reuse Device.enabled(). Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
c0c8dd1b85
commit
f7f0e0adf9
1 changed files with 1 additions and 4 deletions
|
@ -578,10 +578,7 @@ class Device:
|
||||||
|
|
||||||
prop = node.props.get(name)
|
prop = node.props.get(name)
|
||||||
if not prop:
|
if not prop:
|
||||||
if not optional and \
|
if not optional and self.enabled:
|
||||||
("status" not in node.props or
|
|
||||||
node.props["status"].to_string() != "disabled"):
|
|
||||||
|
|
||||||
_err("'{}' is marked as required in 'properties:' in {}, but "
|
_err("'{}' is marked as required in 'properties:' in {}, but "
|
||||||
"does not appear in {!r}".format(
|
"does not appear in {!r}".format(
|
||||||
name, self.binding_path, node))
|
name, self.binding_path, node))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue