Skip to content
Permalink
Browse files

dts: edtlib: Simplify 'category: optional' code in Device._prop_val()

Reuse Device.enabled().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
  • Loading branch information...
ulfalizer authored and galak committed Aug 8, 2019
1 parent c0c8dd1 commit f7f0e0adf999ee728d6c8d7c28bc3f4def0e68c6
Showing with 1 addition and 4 deletions.
  1. +1 −4 scripts/dts/edtlib.py
@@ -578,10 +578,7 @@ def _prop_val(self, name, prop_type, optional):

prop = node.props.get(name)
if not prop:
if not optional and \
("status" not in node.props or
node.props["status"].to_string() != "disabled"):

if not optional and self.enabled:
_err("'{}' is marked as required in 'properties:' in {}, but "
"does not appear in {!r}".format(
name, self.binding_path, node))

0 comments on commit f7f0e0a

Please sign in to comment.
You can’t perform that action at this time.