Remove the unused function 08/257408/2
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 23 Apr 2021 10:12:04 +0000 (19:12 +0900)
committerHwanKyu Jhun <h.jhun@samsung.com>
Mon, 26 Apr 2021 00:53:01 +0000 (00:53 +0000)
Calling sd_notify(0, "WATCHDOG=1") is not needed. AMD does not use
systemd watchdog.

Change-Id: I0adc93d8815cf34c2b8ee2b62d65716c324d0fab
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/amd_main.c

index 37ab9133204ede8a61d0e2c9234fe6fa14da0aef..d6031f4aa732388b693676be0c660f61bb87e71c 100644 (file)
@@ -430,28 +430,12 @@ static void __finish(void)
        __unblock_sigchld();
 }
 
-static gboolean __watchdog_cb(gpointer data)
-{
-       sd_notify(0, "WATCHDOG=1");
-       _E("called sd_notify() WATCHDOG");
-       return G_SOURCE_CONTINUE;
-}
-
 EXPORT int amd_main(int argc, char *argv[])
 {
        GMainLoop *mainloop = NULL;
-       guint timer;
-
-       timer = g_timeout_add_seconds_full(G_PRIORITY_HIGH, 10, __watchdog_cb,
-                       NULL, NULL);
-       if (timer == 0) {
-               _E("g_timeout_add_seconds_full() is failed");
-               return -1;
-       }
 
        if (__init() != 0) {
                _E("AMD Initialization failed!\n");
-               g_source_remove(timer);
                return -1;
        }
 
@@ -460,11 +444,9 @@ EXPORT int amd_main(int argc, char *argv[])
        mainloop = g_main_loop_new(NULL, FALSE);
        if (!mainloop) {
                _E("failed to create glib main loop");
-               g_source_remove(timer);
                return -1;
        }
        g_main_loop_run(mainloop);
-       g_source_remove(timer);
 
        __finish();