regulators: Modify close() to use services
Modify the Device::close() method in the Device class to have a new
first parameter: Services& services.
Modify Device::close() to log messages using the new Journal
interface.
Modify the Chassis::closeDevices() method in the Chassis class to
have a new first parameter: Services& services.
Modify Chassis::closeDevices() to log messages using the new
Journal interface.
Signed-off-by: Bob King <Bob_King@wistron.com>
Change-Id: I2a07417d6f7470685f2c27c878ef7936e9f1aa8a
diff --git a/phosphor-regulators/src/chassis.cpp b/phosphor-regulators/src/chassis.cpp
index eb7f496..85e8275 100644
--- a/phosphor-regulators/src/chassis.cpp
+++ b/phosphor-regulators/src/chassis.cpp
@@ -16,7 +16,6 @@
#include "chassis.hpp"
-#include "journal.hpp"
#include "system.hpp"
namespace phosphor::power::regulators
@@ -31,15 +30,16 @@
}
}
-void Chassis::closeDevices()
+void Chassis::closeDevices(Services& services)
{
// Log debug message in journal
- journal::logDebug("Closing devices in chassis " + std::to_string(number));
+ services.getJournal().logDebug("Closing devices in chassis " +
+ std::to_string(number));
// Close devices
for (std::unique_ptr<Device>& device : devices)
{
- device->close();
+ device->close(services);
}
}