sensors: don't pass excess conn handler

We don't need to pass connection handler to setInitialProperties method
since it already part of the sensor class.

Tested: no changes in behaviour.
Signed-off-by: Andrei Kartashev <a.kartashev@yadro.com>
Change-Id: Icaaccbeaf14e22648a6a1bce381f0f0a606b0ddd
diff --git a/include/sensor.hpp b/include/sensor.hpp
index 40f4223..e966c20 100644
--- a/include/sensor.hpp
+++ b/include/sensor.hpp
@@ -237,15 +237,13 @@
         return 1;
     }
 
-    void
-        setInitialProperties(std::shared_ptr<sdbusplus::asio::connection>& conn,
-                             const std::string& unit,
-                             const std::string& label = std::string(),
-                             size_t thresholdSize = 0)
+    void setInitialProperties(const std::string& unit,
+                              const std::string& label = std::string(),
+                              size_t thresholdSize = 0)
     {
         if (readState == PowerState::on || readState == PowerState::biosPost)
         {
-            setupPowerMatch(conn);
+            setupPowerMatch(dbusConnection);
         }
 
         createAssociation(association, configurationPath);
@@ -293,8 +291,8 @@
                     oldValue = request; // todo, just let the config do this?
                     threshold.value = request;
                     thresholds::persistThreshold(configurationPath, objectType,
-                                                 threshold, conn, thresSize,
-                                                 label);
+                                                 threshold, dbusConnection,
+                                                 thresSize, label);
                     // Invalidate previously remembered value,
                     // so new thresholds will be checked during next update,
                     // even if sensor reading remains unchanged.
@@ -328,7 +326,7 @@
         {
             valueMutabilityInterface =
                 std::make_shared<sdbusplus::asio::dbus_interface>(
-                    conn, sensorInterface->get_object_path(),
+                    dbusConnection, sensorInterface->get_object_path(),
                     valueMutabilityInterfaceName);
             valueMutabilityInterface->register_property("Mutable", true);
             if (!valueMutabilityInterface->initialize())
@@ -343,7 +341,7 @@
         {
             availableInterface =
                 std::make_shared<sdbusplus::asio::dbus_interface>(
-                    conn, sensorInterface->get_object_path(),
+                    dbusConnection, sensorInterface->get_object_path(),
                     availableInterfaceName);
             availableInterface->register_property(
                 "Available", true, [this](const bool propIn, bool& old) {
@@ -364,7 +362,7 @@
         {
             operationalInterface =
                 std::make_shared<sdbusplus::asio::dbus_interface>(
-                    conn, sensorInterface->get_object_path(),
+                    dbusConnection, sensorInterface->get_object_path(),
                     operationalInterfaceName);
             operationalInterface->register_property("Functional", true);
             operationalInterface->initialize();