Fixed a problem where objects of certain types (Device,
ThermalZone, Processor, PowerResource) can be not found if they
are declared and referenced from within the same control method
Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>