From: Yunmi Ha Date: Wed, 6 Jan 2021 07:45:03 +0000 (+0900) Subject: Change prefix of list definition X-Git-Tag: submit/tizen/20210108.041937^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70ccbb485ec97f61be5d989bfd6ccdff307548d4;p=platform%2Fcore%2Fsystem%2Flibsvi.git Change prefix of list definition - list to SYS_G_LIST Change-Id: Ia491cf8b4705e8c2f58dbd60f271af12b2c836f9 Signed-off-by: Yunmi Ha --- diff --git a/src/devices.c b/src/devices.c index 433b572..b6f9e75 100644 --- a/src/devices.c +++ b/src/devices.c @@ -24,26 +24,26 @@ #include "devices.h" #include "log.h" -static list *dev_head; +static GList *dev_head; void add_device(const struct device_ops *dev) { - LIST_APPEND(dev_head, (struct device_ops*)dev); + SYS_G_LIST_APPEND(dev_head, (struct device_ops*)dev); } //LCOV_EXCL_START System Error void remove_device(const struct device_ops *dev) { - LIST_REMOVE(dev_head, (struct device_ops*)dev); + SYS_G_LIST_REMOVE(dev_head, (struct device_ops*)dev); } //LCOV_EXCL_STOP const struct device_ops *find_device(int type) { - list *elem; + GList *elem; const struct device_ops *dev; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { if (dev->type == type) return dev; } @@ -52,10 +52,10 @@ const struct device_ops *find_device(int type) void devices_init(void) { - list *elem; + GList *elem; const struct device_ops *dev; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { _D("[%s] initialize", dev->name); if (dev->init) dev->init(); @@ -64,10 +64,10 @@ void devices_init(void) void devices_exit(void) { - list *elem; + GList *elem; const struct device_ops *dev; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { _D("[%s] deinitialize", dev->name); if (dev->exit) dev->exit(); @@ -76,11 +76,11 @@ void devices_exit(void) int devices_play(int pattern, bool always) { - list *elem; + GList *elem; const struct device_ops *dev; int ret, prev = -EPERM; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { if (dev->play) { ret = dev->play(pattern, always); if ((prev < 0 && ret == 0) || @@ -99,11 +99,11 @@ int devices_play(int pattern, bool always) int devices_play_soundpath(int pattern, const char *soundpath, bool always) { - list *elem; + GList *elem; const struct device_ops *dev; int ret, prev = -EPERM; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { if (dev->type == FEEDBACK_TYPE_SOUND) { if (dev->play_path) ret = dev->play_path(pattern, soundpath, always); @@ -131,11 +131,11 @@ int devices_play_soundpath(int pattern, const char *soundpath, bool always) int devices_stop(void) { - list *elem; + GList *elem; const struct device_ops *dev; int ret = -ENOTSUP; - LIST_FOREACH(dev_head, elem, dev) { + SYS_G_LIST_FOREACH(dev_head, elem, dev) { if (dev->stop) ret = dev->stop(); }