control: Remove manager parameter from create trigger function

The pointer to the manager object is no longer needed when creating a
trigger since its provided when the trigger is enabled.

Change-Id: Ib5b3923bf87c405243630e622f383b27f50453a5
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/event.cpp b/control/json/event.cpp
index faa8c84..f63e38a 100644
--- a/control/json/event.cpp
+++ b/control/json/event.cpp
@@ -244,7 +244,7 @@
         if (trigFunc != trigger::triggers.end())
         {
             _triggers.emplace_back(
-                trigFunc->second(jsonTrig, getName(), _manager, _actions));
+                trigFunc->second(jsonTrig, getName(), _actions));
         }
         else
         {
diff --git a/control/json/triggers/init.cpp b/control/json/triggers/init.cpp
index d21a918..dee8587 100644
--- a/control/json/triggers/init.cpp
+++ b/control/json/triggers/init.cpp
@@ -121,7 +121,6 @@
 }
 
 enableTrigger triggerInit(const json& jsonObj, const std::string& eventName,
-                          Manager* mgr,
                           std::vector<std::unique_ptr<ActionBase>>& actions)
 {
     // Get the method handler if configured
diff --git a/control/json/triggers/init.hpp b/control/json/triggers/init.hpp
index dffee1f..0bd43cb 100644
--- a/control/json/triggers/init.hpp
+++ b/control/json/triggers/init.hpp
@@ -60,7 +60,6 @@
  *
  * @param[in] jsonObj - JSON object for the trigger
  * @param[in] eventName - Name of event creating the trigger
- * @param[in] mgr - Manager to setup the trigger on
  * @param[in] actions - Actions associated with the trigger
  *
  * When fan control starts (or restarts), all events with 'init' triggers are
@@ -72,7 +71,6 @@
  * before any signal may be received.
  */
 enableTrigger triggerInit(const json& jsonObj, const std::string& eventName,
-                          Manager* mgr,
                           std::vector<std::unique_ptr<ActionBase>>& actions);
 
 } // namespace phosphor::fan::control::json::trigger::init
diff --git a/control/json/triggers/signal.cpp b/control/json/triggers/signal.cpp
index 4869ee9..28b2781 100644
--- a/control/json/triggers/signal.cpp
+++ b/control/json/triggers/signal.cpp
@@ -216,7 +216,6 @@
 }
 
 enableTrigger triggerSignal(const json& jsonObj, const std::string& eventName,
-                            Manager* mgr,
                             std::vector<std::unique_ptr<ActionBase>>& actions)
 {
     auto subscriber = signals.end();
diff --git a/control/json/triggers/signal.hpp b/control/json/triggers/signal.hpp
index a1d8109..2ab167b 100644
--- a/control/json/triggers/signal.hpp
+++ b/control/json/triggers/signal.hpp
@@ -98,7 +98,6 @@
  *
  * @param[in] jsonObj - JSON object for the trigger
  * @param[in] eventName - Name of event associated to the signal
- * @param[in] mgr - Pointer to manager of the trigger
  * @param[in] actions - Actions associated with the trigger
  *
  * When fan control starts (or restarts), all events with 'signal' triggers are
@@ -106,7 +105,6 @@
  * configuration, is received.
  */
 enableTrigger triggerSignal(const json& jsonObj, const std::string& eventName,
-                            Manager* mgr,
                             std::vector<std::unique_ptr<ActionBase>>& actions);
 
 } // namespace phosphor::fan::control::json::trigger::signal
diff --git a/control/json/triggers/timer.cpp b/control/json/triggers/timer.cpp
index fcb5e95..6e03412 100644
--- a/control/json/triggers/timer.cpp
+++ b/control/json/triggers/timer.cpp
@@ -71,7 +71,6 @@
 }
 
 enableTrigger triggerTimer(const json& jsonObj, const std::string& eventName,
-                           Manager* mgr,
                            std::vector<std::unique_ptr<ActionBase>>& actions)
 {
     // Get the type and interval of this timer from the JSON
diff --git a/control/json/triggers/timer.hpp b/control/json/triggers/timer.hpp
index 1e6a931..b003531 100644
--- a/control/json/triggers/timer.hpp
+++ b/control/json/triggers/timer.hpp
@@ -51,7 +51,6 @@
  *
  * @param[in] jsonObj - JSON object for the trigger
  * @param[in] eventName - Name of event creating the trigger
- * @param[in] mgr - Manager to setup the trigger on
  * @param[in] actions - Actions associated with the trigger
  *
  * When fan control starts (or restarts), all events with 'timer' triggers
@@ -59,7 +58,6 @@
  * the corresponding event's actions are run.
  */
 enableTrigger triggerTimer(const json& jsonObj, const std::string& eventName,
-                           Manager* mgr,
                            std::vector<std::unique_ptr<ActionBase>>& actions);
 
 } // namespace phosphor::fan::control::json::trigger::timer
diff --git a/control/json/triggers/trigger_aliases.hpp b/control/json/triggers/trigger_aliases.hpp
index c390864..0c7d3b5 100644
--- a/control/json/triggers/trigger_aliases.hpp
+++ b/control/json/triggers/trigger_aliases.hpp
@@ -35,7 +35,7 @@
 
 // Trigger creation function
 using createTrigger =
-    std::function<enableTrigger(const json&, const std::string&, Manager*,
+    std::function<enableTrigger(const json&, const std::string&,
                                 std::vector<std::unique_ptr<ActionBase>>&)>;
 
 } // namespace phosphor::fan::control::json::trigger