diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2015-04-14 10:02:03 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2015-04-14 10:03:09 +0900 |
commit | 7a51d51f5842b57ff545028d77866bc14a545400 (patch) | |
tree | 6675d44025e427c76eeac7b6c94dd5981e36bb0e | |
parent | de374774f959e24b01545b11341542a2e70ae624 (diff) | |
download | deviced-7a51d51f5842b57ff545028d77866bc14a545400.tar.gz deviced-7a51d51f5842b57ff545028d77866bc14a545400.tar.bz2 deviced-7a51d51f5842b57ff545028d77866bc14a545400.zip |
deviced: Remove unused device notifier codes
Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Change-Id: I475b762fc6f8e44eac73b57b6020179bc2f14788
-rw-r--r-- | src/core/device-notifier.c | 79 |
1 files changed, 1 insertions, 78 deletions
diff --git a/src/core/device-notifier.c b/src/core/device-notifier.c index c000f3a0..9c266b9c 100644 --- a/src/core/device-notifier.c +++ b/src/core/device-notifier.c @@ -18,21 +18,16 @@ #include "log.h" -#include "devices.h" #include "device-notifier.h" #include "list.h" #include "common.h" -#define LATE_INIT_WAIT_TIME 12 -#define DEFAULT_LATE_INIT_VALUE ((Ecore_Timer *)0x0DEF0DEF) - struct device_notifier { enum device_notifier_type status; int (*func)(void *data); }; static dd_list *device_notifier_list; -static Ecore_Timer *late_init_timer = DEFAULT_LATE_INIT_VALUE; #define FIND_NOTIFIER(a, b, d, e, f) \ DD_LIST_FOREACH(a, b, d) \ @@ -103,76 +98,4 @@ void device_notify(enum device_notifier_type status, void *data) } } } -} - -static void late_init_stop(void) -{ - if (late_init_timer == NULL || - late_init_timer == DEFAULT_LATE_INIT_VALUE) - return; - ecore_timer_del(late_init_timer); - late_init_timer = NULL; -} - -static int booting_done(void *data) -{ - static int done = 0; - - if (data == NULL) - goto out; - - done = *(int*)data; - if (late_init_timer == NULL) - return done; - late_init_stop(); -out: - return done; -} - -static Eina_Bool late_init_timer_cb(void *data) -{ - int done; - - late_init_stop(); - done = booting_done(NULL); - if (done) - return EINA_FALSE; - _I("late booting done"); - device_notify(DEVICE_NOTIFIER_BOOTING_DONE, &done); - return EINA_FALSE; -} - -static void device_notifier_init(void *data) -{ - int ret; - - ret = check_systemd_active(); - if (ret == TRUE) { - _I("restart booting done"); - return; - } - register_notifier(DEVICE_NOTIFIER_BOOTING_DONE, booting_done); - late_init_timer = ecore_timer_add(LATE_INIT_WAIT_TIME, - late_init_timer_cb, NULL); - if (!late_init_timer) - late_init_timer = DEFAULT_LATE_INIT_VALUE; -} - -static void device_notifier_exit(void *data) -{ - dd_list *n; - struct device_notifier *notifier; - - DD_LIST_FOREACH(device_notifier_list, n, notifier) - DD_LIST_REMOVE(device_notifier_list, notifier); - free(notifier); -} - -static const struct device_ops notifier_device_ops = { - .priority = DEVICE_PRIORITY_NORMAL, - .name = "notifier", - .init = device_notifier_init, - .exit = device_notifier_exit, -}; - -DEVICE_OPS_REGISTER(¬ifier_device_ops) +}
\ No newline at end of file |