Matt Spinler | 76e73c2 | 2021-04-21 11:03:05 -0500 | [diff] [blame] | 1 | #include "power_state.hpp" |
2 | |||||
3 | namespace phosphor::fan | ||||
4 | { | ||||
5 | |||||
6 | std::shared_ptr<PowerState> powerState; | ||||
7 | |||||
8 | std::shared_ptr<PowerState> getPowerStateObject() | ||||
9 | { | ||||
10 | if (!powerState) | ||||
11 | { | ||||
12 | powerState = std::make_shared<PGoodState>(); | ||||
13 | } | ||||
14 | return powerState; | ||||
15 | } | ||||
16 | |||||
17 | } // namespace phosphor::fan |