Change prefix of list definition 71/250971/3 accepted/tizen/unified/20210111.125501 submit/tizen/20210108.041937
authorYunmi Ha <yunmi.ha@samsung.com>
Wed, 6 Jan 2021 07:45:03 +0000 (16:45 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Wed, 6 Jan 2021 10:18:17 +0000 (19:18 +0900)
- list to SYS_G_LIST

Change-Id: Ia491cf8b4705e8c2f58dbd60f271af12b2c836f9
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
src/devices.c

index 433b572abd37659152c2a5462c6fc2e9e721d079..b6f9e7551d10461538ed0a0767a1ca805e2e09ff 100644 (file)
 #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();
        }