summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-19 14:31:29 -0800
committerPatrick Venture <venture@google.com>2019-01-02 11:56:16 -0800
commit2511c09b1d96d7c842482a4fe28eafbc89cc4b7f (patch)
treebf9b23541b3c81ff79fe84d8e6d7c84ea5319753
parent4d9506ccfa41c3cce67e4cceb650bf81cd8022a7 (diff)
downloadphosphor-hwmon-2511c09b1d96d7c842482a4fe28eafbc89cc4b7f.tar.gz
phosphor-hwmon-2511c09b1d96d7c842482a4fe28eafbc89cc4b7f.zip
fan_pwm: add underscore prefix to members
Add underscore prefix to members for fan_pwm object. Change-Id: Ic90d20b6e3881e8b7efe08fde3a08607d7bc6a38 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--fan_pwm.cpp9
-rw-r--r--fan_pwm.hpp10
2 files changed, 10 insertions, 9 deletions
diff --git a/fan_pwm.cpp b/fan_pwm.cpp
index f814c0a..23eb6dc 100644
--- a/fan_pwm.cpp
+++ b/fan_pwm.cpp
@@ -24,8 +24,8 @@ uint64_t FanPwm::target(uint64_t value)
// Write target out to sysfs
try
{
- ioAccess->write(value, type, id, empty, hwmonio::retries,
- hwmonio::delay);
+ _ioAccess->write(value, _type, _id, empty, hwmonio::retries,
+ hwmonio::delay);
}
catch (const std::system_error& e)
{
@@ -34,9 +34,10 @@ uint64_t FanPwm::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, empty);
+ auto file =
+ sysfs::make_sysfs_path(_ioAccess->path(), _type, _id, empty);
log<level::INFO>("Logging failing sysfs file",
phosphor::logging::entry("FILE=%s", file.c_str()));
diff --git a/fan_pwm.hpp b/fan_pwm.hpp
index e80dde0..7aa2a75 100644
--- a/fan_pwm.hpp
+++ b/fan_pwm.hpp
@@ -33,7 +33,7 @@ class FanPwm : public FanPwmObject
sdbusplus::bus::bus& bus, const char* objPath, bool defer,
uint64_t target) :
FanPwmObject(bus, objPath, defer),
- id(id), ioAccess(std::move(io)), devPath(devPath)
+ _id(id), _ioAccess(std::move(io)), _devPath(devPath)
{
FanPwmObject::target(target);
}
@@ -47,13 +47,13 @@ class FanPwm : public FanPwmObject
private:
/** @brief hwmon type */
- static constexpr auto type = "pwm";
+ static constexpr auto _type = "pwm";
/** @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
OpenPOWER on IntegriCloud