Skip to content

Commit

Permalink
dts: edtlib: Simplify 'category: optional' code in Device._prop_val()
Browse files Browse the repository at this point in the history
Reuse Device.enabled().

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
  • Loading branch information
ulfalizer authored and galak committed Aug 9, 2019
1 parent c0c8dd1 commit f7f0e0a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/dts/edtlib.py
Expand Up @@ -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))
Expand Down

0 comments on commit f7f0e0a

Please sign in to comment.