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;
}
}
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;
}
#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"
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;
}
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;
}
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;
}