device-node: Rename the logging macros 72/29872/3
authorjy910.yun <jy910.yun@samsung.com>
Wed, 5 Nov 2014 12:42:00 +0000 (21:42 +0900)
committerjy910.yun <jy910.yun@samsung.com>
Thu, 6 Nov 2014 12:55:21 +0000 (21:55 +0900)
Change DEVERR/DEVLOG macros to _E/_D macros

Signed-off-by: jy910.yun <jy910.yun@samsung.com>
Change-Id: Idd4593e6b271addfb2f0ee8a091223b0267161cf

devices/display.c
include/device-internal.h
src/device-node.c

index 0be1cbebc0b60e5a95e3ef4f5854fe7fb59b8ffb..2900699f7573e0772f80bdde4acd8a3d1e42aa09 100644 (file)
@@ -36,13 +36,13 @@ static int display_get_prop(int __prop, int *val)
 
        r = PLUGIN_GET(display_count)(&disp_cnt);
        if (r < 0) {
-               DEVERR("Get display count failed");
+               _E("Get display count failed");
                return -1;
        }
 
        if (prop != PROP_DISPLAY_BRIGHTNESS_BY_LUX) {
                if (index >= disp_cnt) {
-                       DEVERR("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
+                       _E("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
                        return -1;
                }
        }
@@ -91,12 +91,12 @@ static int display_set_prop(int __prop, int val)
 
        r = PLUGIN_GET(display_count)(&disp_cnt);
        if (r < 0) {
-               DEVERR("Get display count failed");
+               _E("Get display count failed");
                return -1;
        }
 
        if (index >= disp_cnt) {
-               DEVERR("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
+               _E("Invalid Argument: index(%d) > max(%d)", index, disp_cnt);
                return -1;
        }
 
index 7e3dbb709daf0375a63b71b855e65a434ad7f359..e4e84ffe86aea9c0a6b430dafc7b508e25f75750 100644 (file)
 #ifdef FEATURE_DEVICE_NODE_DLOG
 #define LOG_TAG "DEVICE_NODE"
 #include <dlog.h>
-#define DEVLOG(fmt, args...)        SLOGD(fmt, ##args)
-#define DEVERR(fmt, args...)        SLOGE(fmt, ##args)
+#define _I(fmt, args...)        SLOGI(fmt, ##args)
+#define _D(fmt, args...)        SLOGD(fmt, ##args)
+#define _E(fmt, args...)        SLOGE(fmt, ##args)
 #else
-#define DEVLOG(x, ...)              do { } while (0)
-#define DEVERR(x, ...)              do { } while (0)
+#define _I(x, ...)              do { } while (0)
+#define _D(x, ...)              do { } while (0)
+#define _E(x, ...)              do { } while (0)
 #endif
 
 #define DEVMAN_PLUGIN_PATH  "/usr/lib/libslp_devman_plugin.so"
index 461277825744b9b9982777627deaab89262eb7a3..52c74fb2f7f92443b246d4ebb21237ca90d64f00 100644 (file)
@@ -63,31 +63,31 @@ API int device_get_property(enum device_type devtype, int property, int *value)
 
        type = find_device(devtype);
        if (type == NULL) {
-               DEVERR("devtype cannot find");
+               _E("devtype cannot find");
                errno = EPERM;
                return -1;
        }
 
        dev = container_of(type, struct device, type);
        if (dev == NULL) {
-               DEVERR("device cannot find");
+               _E("device cannot find");
                errno = EPERM;
                return -1;
        }
 
        if (dev->get_prop == NULL) {
-               DEVERR("devtype doesn't have getter function");
+               _E("devtype doesn't have getter function");
                errno = EPERM;
                return -1;
        }
 
        r = dev->get_prop(property, value);
        if (r == -ENODEV) {
-               DEVERR("Not support driver");
+               _E("Not support driver");
                errno = ENODEV;
                return -1;
        } else if (r == -1) {
-               DEVERR("get_prop of %s(%d) return failes", dev->name, property);
+               _E("get_prop of %s(%d) return failes", dev->name, property);
                errno = EPERM;
                return -1;
        }
@@ -104,31 +104,31 @@ API int device_set_property(enum device_type devtype, int property, int value)
 
        type = find_device(devtype);
        if (type == NULL) {
-               DEVERR("devtype cannot find");
+               _E("devtype cannot find");
                errno = EPERM;
                return -1;
        }
 
        dev = container_of(type, struct device, type);
        if (dev == NULL) {
-               DEVERR("device cannot find");
+               _E("device cannot find");
                errno = EPERM;
                return -1;
        }
 
        if (dev->set_prop == NULL) {
-               DEVERR("devtype doesn't have setter function");
+               _E("devtype doesn't have setter function");
                errno = EPERM;
                return -1;
        }
 
        r = dev->set_prop(property, value);
        if (r == -ENODEV) {
-               DEVERR("Not support driver");
+               _E("Not support driver");
                errno = ENODEV;
                return -1;
        } else if (r == -1) {
-               DEVERR("set_prop of %s(%d) return failes", dev->name, property);
+               _E("set_prop of %s(%d) return failes", dev->name, property);
                errno = EPERM;
                return -1;
        }
@@ -144,19 +144,19 @@ static void __CONSTRUCTOR__ module_init(void)
 
        dlopen_handle = dlopen(DEVMAN_PLUGIN_PATH, RTLD_NOW);
        if (!dlopen_handle) {
-               DEVERR("dlopen() failed");
+               _E("dlopen() failed");
                goto ERROR;
        }
 
        OEM_sys_get_devman_plugin_interface = dlsym(dlopen_handle, "OEM_sys_get_devman_plugin_interface");
        if ((error = dlerror()) != NULL) {
-               DEVERR("dlsym() failed: %s", error);
+               _E("dlsym() failed: %s", error);
                goto ERROR;
        }
 
        plugin_intf = OEM_sys_get_devman_plugin_interface();
        if (!plugin_intf) {
-               DEVERR("get_devman_plugin_interface() failed");
+               _E("get_devman_plugin_interface() failed");
                goto ERROR;
        }