presence: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang
format.
Tested: Compiled
Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/presence/gpio.cpp b/presence/gpio.cpp
index 19593c2..1aa63a4 100644
--- a/presence/gpio.cpp
+++ b/presence/gpio.cpp
@@ -13,14 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <functional>
+#include "gpio.hpp"
+
+#include "rpolicy.hpp"
+
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <sdeventplus/event.hpp>
-#include <tuple>
#include <xyz/openbmc_project/Common/Callout/error.hpp>
-#include "gpio.hpp"
-#include "rpolicy.hpp"
+
+#include <functional>
+#include <tuple>
namespace phosphor
{
@@ -29,24 +32,17 @@
namespace presence
{
-Gpio::Gpio(
- const std::string& physDevice,
- const std::string& device,
- unsigned int physPin) :
+Gpio::Gpio(const std::string& physDevice, const std::string& device,
+ unsigned int physPin) :
currentState(false),
evdevfd(open(device.c_str(), O_RDONLY | O_NONBLOCK)),
- evdev(evdevpp::evdev::newFromFD(evdevfd())),
- phys(physDevice),
- pin(physPin)
-{
-
-}
+ evdev(evdevpp::evdev::newFromFD(evdevfd())), phys(physDevice), pin(physPin)
+{}
bool Gpio::start()
{
- source.emplace(sdeventplus::Event::get_default(),
- evdevfd(), EPOLLIN,
- std::bind(&Gpio::ioCallback, this));
+ source.emplace(sdeventplus::Event::get_default(), evdevfd(), EPOLLIN,
+ std::bind(&Gpio::ioCallback, this));
currentState = present();
return currentState;
}
@@ -68,9 +64,8 @@
using namespace xyz::openbmc_project::Common::Callout;
report<sdbusplus::xyz::openbmc_project::Common::Callout::Error::GPIO>(
- GPIO::CALLOUT_GPIO_NUM(pin),
- GPIO::CALLOUT_ERRNO(0),
- GPIO::CALLOUT_DEVICE_PATH(phys.c_str()));
+ GPIO::CALLOUT_GPIO_NUM(pin), GPIO::CALLOUT_ERRNO(0),
+ GPIO::CALLOUT_DEVICE_PATH(phys.c_str()));
}
void Gpio::ioCallback()