Parcourir la source

dtoc: Use self._options instead of the global options

This class should use the options object passed to it rather than finding
the global one. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass il y a 8 ans
Parent
commit
418355cbaa
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      tools/dtoc/dtoc.py

+ 2 - 2
tools/dtoc/dtoc.py

@@ -177,7 +177,7 @@ class DtbPlatdata:
         for node in root.subnodes:
             if 'compatible' in node.props:
                 status = node.props.get('status')
-                if (not options.include_disabled and not status or
+                if (not self._options.include_disabled and not status or
                     status.value != 'disabled'):
                     self._valid_nodes.append(node)
                     phandle_prop = node.props.get('phandle')
@@ -203,7 +203,7 @@ class DtbPlatdata:
         for node in self.fdt.GetRoot().subnodes:
             if 'compatible' in node.props:
                 status = node.props.get('status')
-                if (not options.include_disabled and not status or
+                if (not self._options.include_disabled and not status or
                     status.value != 'disabled'):
                     node_list.append(node)
                     phandle_prop = node.props.get('phandle')