common: Apply Tizen coding rule
authorsunm.lee <sunm.lee@samsung.com>
Thu, 19 May 2016 05:18:08 +0000 (14:18 +0900)
committersunm.lee <sunm.lee@samsung.com>
Thu, 19 May 2016 05:19:30 +0000 (14:19 +0900)
Apply Tizen coding rule.

Change-Id: I2d535f4973a5c573e2c3e96e5a7a631f74ac5365
Signed-off-by: sunm.lee <sunm.lee@samsung.com>
src/device_manager_TRM.c
src/device_manager_io.c
src/device_manager_plugin_sc7727.c
src/device_manager_siop.c
src/test_devices.c

index ecffb25..541d240 100644 (file)
@@ -16,7 +16,7 @@
 #include "device_manager_TRM.h"
 
 #define DEVMGR_LOG
-#if defined (DEVMGR_LOG)
+#if defined(DEVMGR_LOG)
 #define LOG_TAG "DEVICE_PLUGIN"
 #include <dlog/dlog.h>
 #define devmgr_log(fmt, args...)       SLOGI(fmt, ##args)
@@ -59,7 +59,7 @@ void TRM_send_socket(char *soket_path, char *write_buf)
        snprintf(addr.sun_path, UNIX_PATH_MAX, "%s", soket_path);
        addr.sun_family = AF_LOCAL;
 
-       ret = connect(socket_fd, (struct sockaddr *) &addr ,sizeof(sa_family_t) + strlen(soket_path) );
+       ret = connect(socket_fd, (struct sockaddr *) &addr, sizeof(sa_family_t) + strlen(soket_path));
        if (ret != 0) {
                running_step = 2;
                close(socket_fd);
@@ -72,7 +72,7 @@ void TRM_send_socket(char *soket_path, char *write_buf)
 
        return;
 
-fail :
+fail:
        return;
 
 }
@@ -81,8 +81,8 @@ fail :
 
 #define TRM_SOCKET_FOR_SCENARIO_INFO       "/dev/socket/scenario_info"
 
-int Tizen_Resource_Manager(char *event_lock) {
-
+int Tizen_Resource_Manager(char *event_lock)
+{
        TRM_send_socket(TRM_SOCKET_FOR_SCENARIO_INFO, event_lock);
 
        return 0;
index 1aa1467..ee460ff 100644 (file)
@@ -78,7 +78,7 @@ int sys_get_int_wo_convert(char *path, int *value)
                close(fd);
                return -1;
        }
-       close (fd);
+       close(fd);
 
        return 0;
 }
@@ -166,8 +166,7 @@ int sys_get_str(char *fname, char *str)
 {
        char buf[BUFF_MAX] = {0};
 
-       if (sys_read_buf(fname, buf) == 0)
-       {
+       if (sys_read_buf(fname, buf) == 0) {
                strncpy(str, buf, strlen(buf));
                return 0;
        }
index cabb85b..1662e31 100644 (file)
@@ -32,7 +32,7 @@
 
 #define BUFF_MAX       255
 #define MAX_NAME 255
-#define MIN(a,b)       ((a)<(b) ? (a):(b))
+#define MIN(a, b)      ((a) < (b) ? (a) : (b))
 #if 0
 #define GENERATE_ACCESSORS_CHAR_RW(_suffix, _item)     \
 char *OEM_sys_get_##_suffix()                  \
@@ -98,8 +98,7 @@ GENERATE_ACCESSORS_INT_RW(lcd_power, LCD_POWER_PATH)
 #define devmgr_log(fmt, args...)
 #endif
 
-enum display_type
-{
+enum display_type {
        DISP_MAIN = 0,
        DISP_SUB,
        DISP_MAX
@@ -110,8 +109,7 @@ enum lux_status {
        increment,
 };
 
-enum CABC_MODE
-{
+enum CABC_MODE {
        CABC_OFF = 0,
        CABC_USER_INTERFACE,
        CABC_STILL_PICTURE,
@@ -125,8 +123,7 @@ enum {
        TEMP_RANGE_2,           /*temperature <= -20*/
 };
 
-struct display_info
-{
+struct display_info {
        enum display_type etype; /* FIXME:!! Main LCD or Sub LCD node */
        char bl_name[MAX_NAME+1]; /* backlight name */
        char lcd_name[MAX_NAME+1]; /* lcd name */
@@ -235,7 +232,7 @@ int OEM_sys_get_brightness(unsigned int lux)
        };
        int brightness;
 
-       for (brightness=0; (lux > Nr_Table[brightness]) && (brightness < 99); brightness++);
+       for (brightness = 0; (lux > Nr_Table[brightness]) && (brightness < 99); brightness++);
 
        return brightness;
 }
@@ -294,7 +291,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(bl_path);
        if (dirp) {
-               while(dent = readdir(dirp)) {
+               while (dent = readdir(dirp)) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;
@@ -317,7 +314,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(lcd_path);
        if (dirp) {
-               while(dent = readdir(dirp)) {
+               while (dent = readdir(dirp)) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;
@@ -432,7 +429,7 @@ int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving)
        }
 
        snprintf(path, MAX_NAME, MDNIE_BACKLIGHT_BRIGHTNESS_PATH);
-       if(!sys_check_node((char *)path)) {
+       if (!sys_check_node((char *)path)) {
                ret = sys_get_int(path, value);
        } else {
                snprintf(path, MAX_NAME, BACKLIGHT_BRIGHTNESS_PATH, disp_info[index].bl_name);
@@ -441,11 +438,10 @@ int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving)
 
        /*devmgr_log("path[%s]value[%d]power_saving[%d]", path, *value, power_saving);*/
 
-       if (power_saving){
+       if (power_saving) {
                snprintf(path, MAX_NAME, BACKLIGHT_MAX_BRIGHTNESS_PATH, disp_info[index].bl_name);
                ret = sys_get_int(path, &max_brightness);
-               if (ret)
-               {
+               if (ret) {
                        devmgr_log("Can't read max_brightness node[%s]", path);
                        return ret;
                }
@@ -491,7 +487,7 @@ int set_backlight_brightness(int index, int value)
        }
 
        snprintf(path, MAX_NAME, MDNIE_BACKLIGHT_BRIGHTNESS_PATH);
-       if(!sys_check_node((char *)path)) {
+       if (!sys_check_node((char *)path)) {
                ret = sys_set_int(path, value);
        } else {
                snprintf(path, MAX_NAME, BACKLIGHT_BRIGHTNESS_PATH, disp_info[index].bl_name);
@@ -524,8 +520,7 @@ int OEM_sys_set_backlight_brightness(int index, int value, int power_saving)
                value = backlight_max_brightness;
 
        ret = set_backlight_brightness(index, value);
-       if (ret)
-       {
+       if (ret) {
                devmgr_log("Can't set backlight brightness");
                return ret;
        }
@@ -737,7 +732,7 @@ int OEM_sys_get_lcd_cabc(int index, int *value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)mdnie_cabc_path)) {
+       if (!sys_check_node((char *)mdnie_cabc_path)) {
                ret = sys_get_int((char *)mdnie_cabc_path, value);
                devmgr_log("path[%s]value[%d]", mdnie_cabc_path, *value);
        } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -765,7 +760,7 @@ int OEM_sys_set_lcd_cabc(int index, int value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)mdnie_cabc_path)) {
+       if (!sys_check_node((char *)mdnie_cabc_path)) {
                ret = sys_set_int((char *)mdnie_cabc_path, value);
                devmgr_log("path[%s]value[%d]", mdnie_cabc_path, value);
        } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -795,11 +790,11 @@ int OEM_sys_get_auto_screen_tone(int index, int *value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)acl_path)) {
+       if (!sys_check_node((char *)acl_path)) {
                        ret = sys_get_int((char *)acl_path, value);
                        devmgr_log("path[%s]value[%d]", acl_path, *value);
        } else {
-               if(!sys_check_node((char *)mdnie_cabc_path)) {
+               if (!sys_check_node((char *)mdnie_cabc_path)) {
                        ret = sys_get_int((char *)mdnie_cabc_path, value);
                        devmgr_log("path[%s]value[%d]", mdnie_cabc_path, *value);
                } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -829,11 +824,11 @@ int OEM_sys_set_auto_screen_tone(int index, int value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)acl_path)) {
+       if (!sys_check_node((char *)acl_path)) {
                        ret = sys_set_int((char *)acl_path, value);
                        devmgr_log("path[%s]value[%d]", acl_path, value);
        } else {
-               if(!sys_check_node((char *)mdnie_cabc_path)) {
+               if (!sys_check_node((char *)mdnie_cabc_path)) {
                        if (value > CABC_OFF)
                                value = CABC_USER_INTERFACE;
                        ret = sys_set_int((char *)mdnie_cabc_path, value);
@@ -1271,14 +1266,12 @@ int OEM_sys_set_irled_control(char *value)
        return 0;
 }
 
-
 static int OEM_sys_get_extcon(int type, int *value)
 {
        int ret = -1;
 
        switch (type) {
-               case USB_ID:
+       case USB_ID:
                {
                        char buf[BUFF_MAX] = {0};
                        char *stop;
@@ -1288,7 +1281,7 @@ static int OEM_sys_get_extcon(int type, int *value)
                        devmgr_log("USB ID:[0x%x]\n", buf);
                break;
                }
-               default:
+       default:
                break;
        }
 
@@ -1342,9 +1335,9 @@ int OEM_sys_set_power_state(int value)
 
 int OEM_sys_set_power_lock(int value)
 {
-       static int power_lock_state=-1;
+       static int power_lock_state = -1;
 
-       if(power_lock_state == value)
+       if (power_lock_state == value)
                return -1;
        else
                power_lock_state = value;
@@ -1367,14 +1360,13 @@ int OEM_sys_get_power_lock_support(int *value)
        if (err == -1) {
                devmgr_log("power lock node not found");
                *value = 0;
-       }
-       else
+       } else
                *value = 1;
 
        return 0;
 }
 
-int OEM_sys_set_resetkey_disable (int value)
+int OEM_sys_set_resetkey_disable(int value)
 {
        int ret = -1;
 
@@ -1383,8 +1375,8 @@ int OEM_sys_set_resetkey_disable (int value)
        else
                value = 0;
 
-       ret= sys_set_int(KEY_MANUAL_RESET_PMIC_PATH, value);
-       ret= sys_set_int(KEY_MANUAL_RESET_SAFEOUT_PATH, value);
+       ret = sys_set_int(KEY_MANUAL_RESET_PMIC_PATH, value);
+       ret = sys_set_int(KEY_MANUAL_RESET_SAFEOUT_PATH, value);
 
        return ret;
 }
@@ -1559,7 +1551,7 @@ EXPORT_API const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_inte
        devman_plugin_interface_sc7727.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_present = &OEM_sys_get_battery_present;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_health = &OEM_sys_get_battery_health;
-       devman_plugin_interface_sc7727.OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required;
+       devman_plugin_interface_sc7727.OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging;
 
        /* Connection interfaces  */
@@ -1617,7 +1609,7 @@ EXPORT_API const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_inte
        devman_plugin_interface_sc7727.OEM_sys_set_battery_siop_active = &OEM_sys_set_battery_siop_active;
 
        devman_plugin_interface_sc7727.OEM_sys_get_cpu_enable_max_number = &OEM_sys_get_cpu_enable_max_number;
-       devman_plugin_interface_sc7727.OEM_sys_set_cpu_enable_max_number= &OEM_sys_set_cpu_enable_max_number;
+       devman_plugin_interface_sc7727.OEM_sys_set_cpu_enable_max_number = &OEM_sys_set_cpu_enable_max_number;
 
        devman_plugin_interface_sc7727.OEM_sys_set_pm_scenario = &Tizen_Resource_Manager;
 
index 68897a4..783c38c 100644 (file)
@@ -24,7 +24,7 @@
 #include "device_manager_io.h"
 
 #define DEVMGR_LOG
-#if defined (DEVMGR_LOG)
+#if defined(DEVMGR_LOG)
 #define LOG_TAG "DEVICE_PLUGIN"
 #include <dlog/dlog.h>
 #define devmgr_log(fmt, args...)       SLOGD(fmt, ##args)
@@ -36,8 +36,7 @@
 Redwood SIOP table
 Last updated on 2013.5.15
 ====================================================*/
-const device_siop_table siop_table[SIOP_SCENARIO_MAX][SIOP_LEVEL_MAX] =
-{
+const device_siop_table siop_table[SIOP_SCENARIO_MAX][SIOP_LEVEL_MAX] = {
        {/***********  LCD ON *****************************/
                /*  ITEM :   cpu_freq cpu_core  charging  BL lcd_freq */
                /*  UNIT :    MHz               #core           mA              cd              Hz       */
@@ -53,7 +52,7 @@ const device_siop_table siop_table[SIOP_SCENARIO_MAX][SIOP_LEVEL_MAX] =
 
        {/***********  LCD OFF ****************************/
                /*  ITEM :   cpu_freq cpu_core  charging  BL lcd_freq */
-               /*  UNIT :    MHz               #core           mA              cd              Hz       */
+               /*  UNIT :    MHz               #core           mA              cd              Hz       */
                /* level 0 */{IGNORE,           IGNORE,         IGNORE,         IGNORE,         IGNORE},
                /* level 1 */{IGNORE,           IGNORE,         IGNORE,         IGNORE,         IGNORE},
                /* level 2 */{IGNORE,           IGNORE,         IGNORE,         IGNORE,         IGNORE},
@@ -69,15 +68,13 @@ const device_siop_table siop_table[SIOP_SCENARIO_MAX][SIOP_LEVEL_MAX] =
 #define MAX_NAME 255
 #define BUFF_MAX       255
 
-enum display_type
-{
+enum display_type {
        DISP_MAIN = 0,
        DISP_SUB,
        DISP_MAX
 };
 
-struct display_info
-{
+struct display_info {
        enum display_type etype; /* FIXME:!! Main LCD or Sub LCD node */
        char bl_name[MAX_NAME+1]; /* backlight name */
        char lcd_name[MAX_NAME+1]; /* lcd name */
@@ -137,10 +134,10 @@ int OEM_sys_set_battery_siop_active(int value)
 static int sys_set_battery_siop_control(int level, int charge_current)
 {
        int ret;
-       int siop_activated=0;
+       int siop_activated = 0;
        char buf[BUFF_MAX];
 
-       if (charge_current>=0)
+       if (charge_current >= 0)
                siop_activated = 1;
 
        ret = sys_set_int(BATTERY_SIOP_ACTIVATE_PATH, siop_activated);
@@ -148,7 +145,7 @@ static int sys_set_battery_siop_control(int level, int charge_current)
                return -ENODEV;
        }
 
-       if(siop_activated == 1) {
+       if (siop_activated == 1) {
                ret = sys_set_int(BATTERY_SIOP_LEVEL_PATH, level);
                if (ret == -1) {
                        return -ENODEV;
@@ -176,7 +173,7 @@ int OEM_sys_get_backlight_overheating_control(int index, int *value)
        }
 
        snprintf(path, MAX_NAME, MDNIE_BACKLIGHT_OVERHEATING_PATH);
-       if(!sys_check_node((char *)path)) {
+       if (!sys_check_node((char *)path)) {
                ret = sys_get_int(path, value);
        } else {
                snprintf(path, MAX_NAME, BACKLIGHT_OVERHEATING_PATH, disp_info[index].bl_name);
@@ -204,8 +201,7 @@ int OEM_sys_set_backlight_overheating_control(int index, int value)
        }
 
        ret = set_backlight_brightness(index, value);
-       if (ret)
-       {
+       if (ret) {
                devmgr_log("Can't set backlight brightness");
                return ret;
        }
@@ -213,7 +209,7 @@ int OEM_sys_set_backlight_overheating_control(int index, int value)
        return ret;
 }
 
-int current_level=-1, current_mode=-1;
+int current_level = -1, current_mode = -1;
 device_siop_table current_table = {RELEASE, RELEASE, RELEASE, 100, 60};
 
 int OEM_sys_set_siop_control(int level, int mode)
@@ -222,50 +218,50 @@ int OEM_sys_set_siop_control(int level, int mode)
 
        memcpy(&new_table, &siop_table[mode][level], sizeof(device_siop_table));
 
-       devmgr_log("level %d, mode %d",level, mode);
-       devmgr_log("current_siop {%d, %d, %d, %d, %d}",current_table.cpu_freq, current_table.cpu_max_core,\
+       devmgr_log("level %d, mode %d", level, mode);
+       devmgr_log("current_siop {%d, %d, %d, %d, %d}", current_table.cpu_freq, current_table.cpu_max_core,\
                current_table.battery_charing, current_table.backlight, current_table.lcd_freq);
-       devmgr_log("new_siop {%d, %d, %d, %d, %d}",new_table.cpu_freq, new_table.cpu_max_core,\
+       devmgr_log("new_siop {%d, %d, %d, %d, %d}", new_table.cpu_freq, new_table.cpu_max_core,\
                new_table.battery_charing, new_table.backlight, new_table.lcd_freq);
 
-       if((current_level==level) && (current_mode==mode))
+       if ((current_level == level) && (current_mode == mode))
                return 0;
 
        /* CPU */
-       if((new_table.cpu_freq != IGNORE) && (new_table.cpu_freq != current_table.cpu_freq)) {
-               devmgr_log("CPU max clock %d",new_table.cpu_freq);
+       if ((new_table.cpu_freq != IGNORE) && (new_table.cpu_freq != current_table.cpu_freq)) {
+               devmgr_log("CPU max clock %d", new_table.cpu_freq);
                sys_set_int(CPUFREQ_POWER_MAX_FREQ_PATH, new_table.cpu_freq);
                current_table.cpu_freq = new_table.cpu_freq;
        }
-       if((new_table.cpu_max_core != IGNORE) && (new_table.cpu_max_core != current_table.cpu_max_core)) {
-               devmgr_log("CPU max core num %d",new_table.cpu_max_core);
+       if ((new_table.cpu_max_core != IGNORE) && (new_table.cpu_max_core != current_table.cpu_max_core)) {
+               devmgr_log("CPU max core num %d", new_table.cpu_max_core);
                sys_set_int(CPU_ENABLE_MAX_NUMBER_PATH, new_table.cpu_max_core);
                current_table.cpu_max_core = new_table.cpu_max_core;
        }
 
        /* Battery charging */
        //OEM_sys_set_battery_siop_active(siop_table[level].battery_charing);
-       if((new_table.battery_charing != IGNORE) && (new_table.battery_charing != current_table.battery_charing)) {
-               devmgr_log("battery_charing current %d",new_table.battery_charing);
+       if ((new_table.battery_charing != IGNORE) && (new_table.battery_charing != current_table.battery_charing)) {
+               devmgr_log("battery_charing current %d", new_table.battery_charing);
                sys_set_battery_siop_control(level, new_table.battery_charing);
                current_table.battery_charing = new_table.battery_charing;
        }
 
        /* LCD */
-       if((new_table.backlight != IGNORE) && (new_table.backlight != current_table.backlight)) {
-               devmgr_log("backlight %d",new_table.backlight);
+       if ((new_table.backlight != IGNORE) && (new_table.backlight != current_table.backlight)) {
+               devmgr_log("backlight %d", new_table.backlight);
                OEM_sys_set_backlight_overheating_control(DISP_MAIN, new_table.backlight);
                current_table.backlight = new_table.backlight;
        }
 
-       if((new_table.lcd_freq != IGNORE) && (new_table.lcd_freq != current_table.lcd_freq)) {
-               devmgr_log("lcd_freq %d",new_table.lcd_freq);
+       if ((new_table.lcd_freq != IGNORE) && (new_table.lcd_freq != current_table.lcd_freq)) {
+               devmgr_log("lcd_freq %d", new_table.lcd_freq);
                sys_set_int(DISPLAY_FRAME_RATE_PATH, new_table.lcd_freq);
                current_table.lcd_freq = new_table.lcd_freq;
        }
 
-       current_level=level;
-       current_mode=mode;
+       current_level = level;
+       current_mode = mode;
 
        return 0;
 }
index 515da46..ec73b45 100644 (file)
@@ -74,8 +74,7 @@ GENERATE_ACCESSORS_INT_RW(lcd_power, LCD_POWER_PATH)
 #define devmgr_log(fmt, args...)
 #endif
 
-enum display_type
-{
+enum display_type {
        DISP_MAIN = 0,
        DISP_SUB,
        DISP_MAX
@@ -86,8 +85,7 @@ enum lux_status {
        increment,
 };
 
-enum CABC_MODE
-{
+enum CABC_MODE {
        CABC_OFF = 0,
        CABC_USER_INTERFACE,
        CABC_STILL_PICTURE,
@@ -95,8 +93,7 @@ enum CABC_MODE
        CABC_MAX,
 };
 
-struct display_info
-{
+struct display_info {
        enum display_type etype; /* FIXME:!! Main LCD or Sub LCD node */
        char bl_name[MAX_NAME+1]; /* backlight name */
        char lcd_name[MAX_NAME+1]; /* lcd name */
@@ -203,7 +200,7 @@ int OEM_sys_get_brightness(unsigned int lux)
        };
        int brightness;
 
-       for (brightness=0; (lux > Nr_Table[brightness]) && (brightness < 99); brightness++);
+       for (brightness = 0; (lux > Nr_Table[brightness]) && (brightness < 99); brightness++);
 
        return brightness;
 }
@@ -262,7 +259,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(bl_path);
        if (dirp) {
-               while(dent = readdir(dirp)) {
+               while (dent = readdir(dirp)) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;
@@ -285,7 +282,7 @@ static int OEM_sys_display_info(struct display_info *disp_info)
        index = 0;
        dirp = opendir(lcd_path);
        if (dirp) {
-               while(dent = readdir(dirp)) {
+               while (dent = readdir(dirp)) {
                        if (index >= DISP_MAX) {
                                devmgr_log("supports %d display node", DISP_MAX);
                                break;
@@ -371,23 +368,22 @@ int OEM_sys_get_backlight_brightness(int index, int *value, int power_saving)
        }
 
        snprintf(path, MAX_NAME, MDNIE_BACKLIGHT_BRIGHTNESS_PATH);
-       if(!sys_check_node((char *)path)) {
+       if (!sys_check_node((char *)path)) {
                ret = sys_get_int(path, value);
-               printf("[%s:%d]:path is %s\n",__FUNCTION__, __LINE__, path);
+               printf("[%s:%d]:path is %s\n", __FUNCTION__, __LINE__, path);
        } else {
                snprintf(path, MAX_NAME, BACKLIGHT_BRIGHTNESS_PATH, disp_info[index].bl_name);
                ret = sys_get_int(path, value);
-               printf("[%s:%d]:path is %s\n",__FUNCTION__, __LINE__, path);
+               printf("[%s:%d]:path is %s\n", __FUNCTION__, __LINE__, path);
        }
 
        /*devmgr_log("path[%s]value[%d]power_saving[%d]", path, *value, power_saving);*/
 
-       if (power_saving){
+       if (power_saving) {
                snprintf(path, MAX_NAME, BACKLIGHT_MAX_BRIGHTNESS_PATH, disp_info[index].bl_name);
-               printf("[%s:%d]:path is %s\n",__FUNCTION__, __LINE__, path);
+               printf("[%s:%d]:path is %s\n", __FUNCTION__, __LINE__, path);
                ret = sys_get_int(path, &max_brightness);
-               if (ret)
-               {
+               if (ret) {
                        devmgr_log("Can't read max_brightness node[%s]", path);
                        return ret;
                }
@@ -433,7 +429,7 @@ int set_backlight_brightness(int index, int value)
        }
 
        snprintf(path, MAX_NAME, MDNIE_BACKLIGHT_BRIGHTNESS_PATH);
-       if(!sys_check_node((char *)path)) {
+       if (!sys_check_node((char *)path)) {
                ret = sys_set_int(path, value);
        } else {
                snprintf(path, MAX_NAME, BACKLIGHT_BRIGHTNESS_PATH, disp_info[index].bl_name);
@@ -457,11 +453,10 @@ int OEM_sys_set_backlight_brightness(int index, int value, int power_saving)
 
        devmgr_log("path[%s]value[%d]power_saving[%d]", path, value, power_saving);
 
-       if (power_saving){
+       if (power_saving) {
                snprintf(path, MAX_NAME, BACKLIGHT_MAX_BRIGHTNESS_PATH, disp_info[index].bl_name);
                ret = sys_get_int(path, &max_brightness);
-               if (ret)
-               {
+               if (ret) {
                        devmgr_log("Can't read max_brightness node[%s]", path);
                        return ret;
                }
@@ -483,8 +478,7 @@ int OEM_sys_set_backlight_brightness(int index, int value, int power_saving)
        }
 
        ret = set_backlight_brightness(index, value);
-       if (ret)
-       {
+       if (ret) {
                devmgr_log("Can't set backlight brightness");
                return ret;
        }
@@ -644,7 +638,7 @@ int OEM_sys_get_lcd_cabc(int index, int *value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)mdnie_cabc_path)) {
+       if (!sys_check_node((char *)mdnie_cabc_path)) {
                ret = sys_get_int((char *)mdnie_cabc_path, value);
                devmgr_log("path[%s]value[%d]", mdnie_cabc_path, *value);
        } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -672,7 +666,7 @@ int OEM_sys_set_lcd_cabc(int index, int value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)mdnie_cabc_path)) {
+       if (!sys_check_node((char *)mdnie_cabc_path)) {
                ret = sys_set_int((char *)mdnie_cabc_path, value);
                devmgr_log("path[%s]value[%d]", mdnie_cabc_path, value);
        } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -702,11 +696,11 @@ int OEM_sys_get_auto_screen_tone(int index, int *value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)acl_path)) {
+       if (!sys_check_node((char *)acl_path)) {
                        ret = sys_get_int((char *)acl_path, value);
                        devmgr_log("path[%s]value[%d]", acl_path, *value);
        } else {
-               if(!sys_check_node((char *)mdnie_cabc_path)) {
+               if (!sys_check_node((char *)mdnie_cabc_path)) {
                        ret = sys_get_int((char *)mdnie_cabc_path, value);
                        devmgr_log("path[%s]value[%d]", mdnie_cabc_path, *value);
                } else if (!sys_check_node((char *)lcd_cabc_path)) {
@@ -736,11 +730,11 @@ int OEM_sys_set_auto_screen_tone(int index, int value)
        snprintf(lcd_cabc_path, MAX_NAME, LCD_CABC_CONTROL_PATH, disp_info[index].lcd_name);
        snprintf(mdnie_cabc_path, MAX_NAME, IMAGE_ENHANCE_PATH, image_enhance_str[INDEX_CABC]);
 
-       if(!sys_check_node((char *)acl_path)) {
+       if (!sys_check_node((char *)acl_path)) {
                        ret = sys_set_int((char *)acl_path, value);
                        devmgr_log("path[%s]value[%d]", acl_path, value);
        } else {
-               if(!sys_check_node((char *)mdnie_cabc_path)) {
+               if (!sys_check_node((char *)mdnie_cabc_path)) {
                        if (value > CABC_OFF)
                                value = CABC_USER_INTERFACE;
                        ret = sys_set_int((char *)mdnie_cabc_path, value);
@@ -1205,9 +1199,9 @@ int OEM_sys_set_power_state(int value)
 
 int OEM_sys_set_power_lock(int value)
 {
-       static int power_lock_state=-1;
+       static int power_lock_state = -1;
 
-       if(power_lock_state == value)
+       if (power_lock_state == value)
                return -1;
        else
                power_lock_state = value;
@@ -1230,14 +1224,13 @@ int OEM_sys_get_power_lock_support(int *value)
        if (err == -1) {
                devmgr_log("power lock node not found");
                *value = 0;
-       }
-       else
+       } else
                *value = 1;
 
        return 0;
 }
 
-int OEM_sys_set_resetkey_disable (int value)
+int OEM_sys_set_resetkey_disable(int value)
 {
        int ret = -1;
 
@@ -1246,8 +1239,8 @@ int OEM_sys_set_resetkey_disable (int value)
        else
                value = 0;
 
-       ret= sys_set_int(KEY_MANUAL_RESET_PMIC_PATH, value);
-       ret= sys_set_int(KEY_MANUAL_RESET_SAFEOUT_PATH, value);
+       ret = sys_set_int(KEY_MANUAL_RESET_PMIC_PATH, value);
+       ret = sys_set_int(KEY_MANUAL_RESET_SAFEOUT_PATH, value);
 
        return ret;
 }
@@ -1421,7 +1414,7 @@ EXPORT_API const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_inte
        devman_plugin_interface_sc7727.OEM_sys_get_battery_charge_now = &OEM_sys_get_battery_charge_now;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_present = &OEM_sys_get_battery_present;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_health = &OEM_sys_get_battery_health;
-       devman_plugin_interface_sc7727.OEM_sys_get_battery_polling_required= &OEM_sys_get_battery_polling_required;
+       devman_plugin_interface_sc7727.OEM_sys_get_battery_polling_required = &OEM_sys_get_battery_polling_required;
        devman_plugin_interface_sc7727.OEM_sys_get_battery_support_insuspend_charging = &OEM_sys_get_battery_support_insuspend_charging;
 
        /* Connection interfaces  */
@@ -1477,7 +1470,7 @@ EXPORT_API const OEM_sys_devman_plugin_interface *OEM_sys_get_devman_plugin_inte
        devman_plugin_interface_sc7727.OEM_sys_set_battery_siop_active = &OEM_sys_set_battery_siop_active;
 
        devman_plugin_interface_sc7727.OEM_sys_get_cpu_enable_max_number = &OEM_sys_get_cpu_enable_max_number;
-       devman_plugin_interface_sc7727.OEM_sys_set_cpu_enable_max_number= &OEM_sys_set_cpu_enable_max_number;
+       devman_plugin_interface_sc7727.OEM_sys_set_cpu_enable_max_number = &OEM_sys_set_cpu_enable_max_number;
 
        devman_plugin_interface_sc7727.OEM_sys_get_temperature_adc = &OEM_sys_get_temperature_adc;
        devman_plugin_interface_sc7727.OEM_sys_get_temperature_value = &OEM_sys_get_temperature_value;
@@ -1669,7 +1662,7 @@ int ret = 0 ;
        OEM_sys_get_backlight_min_brightness(int index, int *value);    //MISSING & not present in Redwood
 
        int OEM_sys_set_svcled_color(int rgb, int led_on_ms, int led_off_ms);   //MISSING  & .......
-       int OEM_sys_set_resetkey_disable (int value);                                           //MISSING  & .......
+       int OEM_sys_set_resetkey_disable(int value);                                            //MISSING  & .......
 
 
        int OEM_sys_set_irled_control(char *value);                             //MISSING  & .......