psu-ng: Make statusWord a member variable with accessor
The STATUS_WORD value read should be included in the PEL additional data
when an error is logged. Make it a member variable of the PowerSupply
class and provide an accessor function.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: Ief8b47e659a2fa6836d467339f2c0dd139c02e73
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index 7fffd70..97acd6d 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -39,7 +39,7 @@
{
try
{
- auto statusWord{pmbusIntf->read(STATUS_WORD, Type::Debug)};
+ statusWord = pmbusIntf->read(STATUS_WORD, Type::Debug);
if (statusWord)
{