diff options
author | Patrick Venture <venture@google.com> | 2018-12-19 14:37:18 -0800 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-01-02 11:56:22 -0800 |
commit | abf29700c8024fcf1b90cf42d678b51243173e40 (patch) | |
tree | 3b35d19fde4ff13e8b674b6906d6525c267155b3 | |
parent | 2511c09b1d96d7c842482a4fe28eafbc89cc4b7f (diff) | |
download | phosphor-hwmon-abf29700c8024fcf1b90cf42d678b51243173e40.tar.gz phosphor-hwmon-abf29700c8024fcf1b90cf42d678b51243173e40.zip |
fan_speed: add underscore prefix to members
Add underscore prefix to members for fan_speed object.
Change-Id: I9a3c444fe31ffc4f15e15eefc15dc652d3b209f1
Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r-- | fan_speed.cpp | 20 | ||||
-rw-r--r-- | fan_speed.hpp | 10 |
2 files changed, 15 insertions, 15 deletions
diff --git a/fan_speed.cpp b/fan_speed.cpp index db683a2..65e5655 100644 --- a/fan_speed.cpp +++ b/fan_speed.cpp @@ -23,8 +23,8 @@ uint64_t FanSpeed::target(uint64_t value) // Write target out to sysfs try { - ioAccess->write(value, type, id, entry::target, hwmonio::retries, - hwmonio::delay); + _ioAccess->write(value, _type, _id, entry::target, hwmonio::retries, + hwmonio::delay); } catch (const std::system_error& e) { @@ -34,9 +34,9 @@ uint64_t FanSpeed::target(uint64_t value) xyz::openbmc_project::Control::Device::WriteFailure:: CALLOUT_ERRNO(e.code().value()), xyz::openbmc_project::Control::Device::WriteFailure:: - CALLOUT_DEVICE_PATH(devPath.c_str())); + CALLOUT_DEVICE_PATH(_devPath.c_str())); - auto file = sysfs::make_sysfs_path(ioAccess->path(), type, id, + auto file = sysfs::make_sysfs_path(_ioAccess->path(), _type, _id, entry::target); log<level::INFO>("Logging failing sysfs file", @@ -51,15 +51,15 @@ uint64_t FanSpeed::target(uint64_t value) void FanSpeed::enable() { - auto enable = env::getEnv("ENABLE", type, id); + auto enable = env::getEnv("ENABLE", _type, _id); if (!enable.empty()) { auto val = std::stoul(enable); try { - ioAccess->write(val, type::pwm, id, entry::enable, hwmonio::retries, - hwmonio::delay); + _ioAccess->write(val, type::pwm, _id, entry::enable, + hwmonio::retries, hwmonio::delay); } catch (const std::system_error& e) { @@ -69,10 +69,10 @@ void FanSpeed::enable() xyz::openbmc_project::Control::Device::WriteFailure:: CALLOUT_ERRNO(e.code().value()), xyz::openbmc_project::Control::Device::WriteFailure:: - CALLOUT_DEVICE_PATH(devPath.c_str())); + CALLOUT_DEVICE_PATH(_devPath.c_str())); - auto fullPath = sysfs::make_sysfs_path(ioAccess->path(), type::pwm, - id, entry::enable); + auto fullPath = sysfs::make_sysfs_path(_ioAccess->path(), type::pwm, + _id, entry::enable); log<level::INFO>( "Logging failing sysfs file", diff --git a/fan_speed.hpp b/fan_speed.hpp index 96d408e..4b79b2a 100644 --- a/fan_speed.hpp +++ b/fan_speed.hpp @@ -34,7 +34,7 @@ class FanSpeed : public FanSpeedObject sdbusplus::bus::bus& bus, const char* objPath, bool defer, uint64_t target) : FanSpeedObject(bus, objPath, defer), - id(id), ioAccess(std::move(io)), devPath(devPath) + _id(id), _ioAccess(std::move(io)), _devPath(devPath) { FanSpeedObject::target(target); } @@ -54,13 +54,13 @@ class FanSpeed : public FanSpeedObject private: /** @brief hwmon type */ - static constexpr auto type = "fan"; + static constexpr auto _type = "fan"; /** @brief hwmon id */ - std::string id; + std::string _id; /** @brief Hwmon sysfs access. */ - std::unique_ptr<hwmonio::HwmonIOInterface> ioAccess; + std::unique_ptr<hwmonio::HwmonIOInterface> _ioAccess; /** @brief Physical device path. */ - std::string devPath; + std::string _devPath; }; } // namespace hwmon |