From f7f0e0adf999ee728d6c8d7c28bc3f4def0e68c6 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 8 Aug 2019 21:32:57 +0200 Subject: [PATCH] dts: edtlib: Simplify 'category: optional' code in Device._prop_val() Reuse Device.enabled(). Signed-off-by: Ulf Magnusson --- scripts/dts/edtlib.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/dts/edtlib.py b/scripts/dts/edtlib.py index 87725888a46..3381b19e516 100644 --- a/scripts/dts/edtlib.py +++ b/scripts/dts/edtlib.py @@ -578,10 +578,7 @@ class Device: 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))