summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsunm.lee <sunm.lee@samsung.com>2016-05-16 17:38:44 +0900
committersunm.lee <sunm.lee@samsung.com>2016-05-16 17:40:10 +0900
commit68d9f776696a3deb9ead5bddfbbb917402f47ea2 (patch)
tree8e972409b908a3e90f47a09b8e60fe64936df34b
parent59c89a05a415592a5bb334f4f317a2755be12e43 (diff)
downloaddeviced-68d9f776696a3deb9ead5bddfbbb917402f47ea2.tar.gz
deviced-68d9f776696a3deb9ead5bddfbbb917402f47ea2.tar.bz2
deviced-68d9f776696a3deb9ead5bddfbbb917402f47ea2.zip
display, tzip: Apply Tizen coding rule
Apply tizen coding rule to src/display, src/tzip. Change-Id: I3193ffc40d1f08b7297633030e82f119fa74abc4 Signed-off-by: sunm.lee <sunm.lee@samsung.com>
-rw-r--r--src/display/auto-brightness.c4
-rw-r--r--src/display/core.c49
-rw-r--r--src/display/device-interface.c2
-rw-r--r--src/display/display-dbus.c12
-rw-r--r--src/display/key-filter.c2
-rw-r--r--src/display/state-tv.c4
-rw-r--r--src/tzip/tzip.c2
7 files changed, 37 insertions, 38 deletions
diff --git a/src/display/auto-brightness.c b/src/display/auto-brightness.c
index 59d1bd69..5c069b5a 100644
--- a/src/display/auto-brightness.c
+++ b/src/display/auto-brightness.c
@@ -50,7 +50,7 @@
#define AUTOMATIC_DEVIDE_VAL 10
#define AUTOMATIC_DELAY_TIME 0.5 /* 0.5 sec */
-#define RADIAN_VALUE (57.2957)
+#define RADIAN_VALUE (57.2957)
#define ROTATION_90 90
#define WORKING_ANGLE_MIN 0
#define WORKING_ANGLE_MAX 20
@@ -277,7 +277,7 @@ static bool alc_update_brt(bool setting)
static bool alc_handler(void *data)
{
- if (pm_cur_state != S_NORMAL){
+ if (pm_cur_state != S_NORMAL) {
if (alc_timeout_id > 0)
ecore_timer_del(alc_timeout_id);
alc_timeout_id = NULL;
diff --git a/src/display/core.c b/src/display/core.c
index 70c6456e..eaad6356 100644
--- a/src/display/core.c
+++ b/src/display/core.c
@@ -139,12 +139,12 @@ enum signal_type {
};
static const char *lcdon_sig_lookup[SIGNAL_MAX] = {
- [SIGNAL_PRE] = "LCDOn",
- [SIGNAL_POST] = "LCDOnCompleted",
+ [SIGNAL_PRE] = "LCDOn",
+ [SIGNAL_POST] = "LCDOnCompleted",
};
static const char *lcdoff_sig_lookup[SIGNAL_MAX] = {
- [SIGNAL_PRE] = "LCDOff",
- [SIGNAL_POST] = "LCDOffCompleted",
+ [SIGNAL_PRE] = "LCDOff",
+ [SIGNAL_POST] = "LCDOffCompleted",
};
#define SHIFT_UNLOCK 4
@@ -186,7 +186,7 @@ struct display_config display_conf = {
.lcdoff_timeout = LCDOFF_TIMEOUT,
.brightness_change_step = BRIGHTNESS_CHANGE_STEP,
.lcd_always_on = LCD_ALWAYS_ON,
- .framerate_app = {0,0,0,0},
+ .framerate_app = {0, 0, 0, 0},
.control_display = 0,
.powerkey_doublepress = 0,
.accel_sensor_on = ACCEL_SENSOR_ON,
@@ -222,7 +222,7 @@ static void set_process_active(bool flag, pid_t pid)
if (pid >= INTERNAL_LOCK_BASE)
return;
- snprintf(str, sizeof(str),"%d", (int)pid);
+ snprintf(str, sizeof(str), "%d", (int)pid);
arr[0] = (flag ? ACTIVE_ACT : INACTIVE_ACT);
arr[1] = str;
@@ -1074,7 +1074,7 @@ int delete_condition(enum state_t state)
void update_lcdoff_source(int source)
{
- switch(source) {
+ switch (source) {
case VCONFKEY_PM_LCDOFF_BY_TIMEOUT:
_I("LCD OFF by timeout");
break;
@@ -1091,17 +1091,17 @@ void update_lcdoff_source(int source)
#ifdef ENABLE_PM_LOG
typedef struct _pm_history {
- time_t time;
- enum pm_log_type log_type;
- int keycode;
+ time_t time;
+ enum pm_log_type log_type;
+ int keycode;
} pm_history;
static int max_history_count = MAX_LOG_COUNT;
static pm_history pm_history_log[MAX_LOG_COUNT] = {{0, }, };
static int history_count = 0;
-static const char history_string[PM_LOG_MAX][15] =
- {"PRESS", "LONG PRESS", "RELEASE", "LCD ON", "LCD ON FAIL",
+static const char history_string[PM_LOG_MAX][15] = {
+ "PRESS", "LONG PRESS", "RELEASE", "LCD ON", "LCD ON FAIL",
"LCD DIM", "LCD DIM FAIL", "LCD OFF", "LCD OFF FAIL", "SLEEP"};
void pm_history_init()
@@ -1113,16 +1113,16 @@ void pm_history_init()
void pm_history_save(enum pm_log_type log_type, int code)
{
- time_t now;
+ time_t now;
- time(&now);
- pm_history_log[history_count].time = now;
- pm_history_log[history_count].log_type = log_type;
- pm_history_log[history_count].keycode = code;
- history_count++;
+ time(&now);
+ pm_history_log[history_count].time = now;
+ pm_history_log[history_count].log_type = log_type;
+ pm_history_log[history_count].keycode = code;
+ history_count++;
- if (history_count >= max_history_count)
- history_count = 0;
+ if (history_count >= max_history_count)
+ history_count = 0;
}
void pm_history_print(int fd, int count)
@@ -1177,7 +1177,7 @@ void print_info(int fd)
ret = write(fd, buf, strlen(buf));
if (ret < 0)
_E("write() failed (%d)", errno);
- snprintf(buf, sizeof(buf),"Timeout Info: Run[%dms] Dim[%dms] Off[%dms]\n",
+ snprintf(buf, sizeof(buf), "Timeout Info: Run[%dms] Dim[%dms] Off[%dms]\n",
states[S_NORMAL].timeout,
states[S_LCDDIM].timeout, states[S_LCDOFF].timeout);
ret = write(fd, buf, strlen(buf));
@@ -1356,8 +1356,7 @@ static int default_trans(int evt)
if (check_lcdoff_direct() == true) {
/* enter next state directly */
states[pm_cur_state].trans(EVENT_TIMEOUT);
- }
- else {
+ } else {
st->action(st->timeout);
}
}
@@ -1583,7 +1582,7 @@ static int default_check(int curr, int next)
trans_cond = trans_condition & MASK_BIT;
vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock_state);
- if (lock_state==VCONFKEY_IDLE_LOCK && curr != S_LCDOFF) {
+ if (lock_state == VCONFKEY_IDLE_LOCK && curr != S_LCDOFF) {
vconf_get_int(VCONFKEY_CALL_STATE, &app_state);
if (app_state == VCONFKEY_CALL_OFF) {
_I("default_check:LOCK STATE, it's transitable");
@@ -1719,7 +1718,7 @@ static int update_setting(int key_idx, int val)
}
backlight_ops.set_default_brt(val);
snprintf(buf, sizeof(buf), "%d", val);
- _D("Brightness set in bl : %d",val);
+ _D("Brightness set in bl : %d", val);
launch_evenif_exist(SET_BRIGHTNESS_IN_BOOTLOADER, buf);
break;
case SETTING_LOCK_SCREEN:
diff --git a/src/display/device-interface.c b/src/display/device-interface.c
index 8cb0699f..542c5f34 100644
--- a/src/display/device-interface.c
+++ b/src/display/device-interface.c
@@ -602,7 +602,7 @@ int exit_sysfs(void)
if (!check_default(ops))
ops->start(NORMAL_MODE);
- if(fd != -1)
+ if (fd != -1)
close(fd);
return 0;
diff --git a/src/display/display-dbus.c b/src/display/display-dbus.c
index e33842e0..4a3ccffc 100644
--- a/src/display/display-dbus.c
+++ b/src/display/display-dbus.c
@@ -644,11 +644,11 @@ static DBusMessage *edbus_setautobrightnessmin(E_DBus_Object *obj, DBusMessage *
const char *sender;
sender = dbus_message_get_sender(msg);
- if (!sender) {
- _E("invalid sender name!");
- ret = -EINVAL;
+ if (!sender) {
+ _E("invalid sender name!");
+ ret = -EINVAL;
goto error;
- }
+ }
if (!display_info.set_autobrightness_min) {
ret = -EIO;
goto error;
@@ -962,7 +962,7 @@ static const struct edbus_method edbus_methods[] = {
{ "setlcdtimeout", "iii", "i", edbus_setlcdtimeout },
{ "LockScreenBgOn", "s", "i", edbus_lockscreenbgon },
{ "GetDisplayCount", NULL, "i", edbus_getdisplaycount },
- { "GetMaxBrightness",NULL, "i", edbus_getmaxbrightness },
+ { "GetMaxBrightness", NULL, "i", edbus_getmaxbrightness },
{ "SetMaxBrightness", "i", "i", edbus_setmaxbrightness },
{ "GetBrightness", NULL, "i", edbus_getbrightness },
{ "SetBrightness", "i", "i", edbus_setbrightness },
@@ -976,7 +976,7 @@ static const struct edbus_method edbus_methods[] = {
{ "PowerKeyIgnore", "i", NULL, edbus_powerkeyignore },
{ "PowerKeyLCDOff", NULL, "i", edbus_powerkeylcdoff },
{ "CustomLCDOn", "i", "i", edbus_customlcdon },
- { "StayTouchScreenOff","i", "i", edbus_staytouchscreenoff },
+ { "StayTouchScreenOff", "i", "i", edbus_staytouchscreenoff },
{ "LCDPanelOffMode", "i", "i", edbus_lcdpaneloffmode },
{ "ActorControl", "sii", "i", edbus_actorcontrol },
{ "CustomBrightness", NULL, "i", edbus_getcustombrightness },
diff --git a/src/display/key-filter.c b/src/display/key-filter.c
index 47788086..21e1da24 100644
--- a/src/display/key-filter.c
+++ b/src/display/key-filter.c
@@ -630,7 +630,7 @@ static void key_backlight_enable(bool enable)
static const struct display_keyfilter_ops normal_keyfilter_ops = {
.init = keyfilter_init,
.check = check_key_filter,
- .set_powerkey_ignore = NULL,
+ .set_powerkey_ignore = NULL,
.powerkey_lcdoff = NULL,
.backlight_enable = key_backlight_enable,
};
diff --git a/src/display/state-tv.c b/src/display/state-tv.c
index 263b32ff..c6bb87db 100644
--- a/src/display/state-tv.c
+++ b/src/display/state-tv.c
@@ -127,7 +127,7 @@ static int lcdon_pre(void *data)
*/
device_notify(DEVICE_NOTIFIER_POWER_RESUME, NULL);
- if (pm_cur_state == S_STANDBY){
+ if (pm_cur_state == S_STANDBY) {
arr[0] = states[S_LCDON].name;
_I("send pre state change NORMAL");
broadcast_edbus_signal(DEVICED_PATH_DISPLAY, DEVICED_INTERFACE_DISPLAY,
@@ -512,7 +512,7 @@ struct _tv_states {
int (*check)(int curr, int next);
int (*trans)(int evt);
int (*action)(int timeout);
-} tv_states [] = {
+} tv_states[] = {
{ S_LCDON, "S_LCDON", lcdon_check, lcdon_trans, lcdon_action },
{ S_LCDOFF, "S_LCDOFF", lcdoff_check, lcdoff_trans, lcdoff_action },
{ S_STANDBY, "S_STANDBY", standby_check, standby_trans, standby_action },
diff --git a/src/tzip/tzip.c b/src/tzip/tzip.c
index 50bcafdd..cdd9cb78 100644
--- a/src/tzip/tzip.c
+++ b/src/tzip/tzip.c
@@ -317,7 +317,7 @@ static void *tzip_thread(void *arg)
size_t len;
ssize_t read;
char *saveptr = NULL;
- char *argv[4] = {"deviced", "-o","allow_other", NULL};
+ char *argv[4] = {"deviced", "-o", "allow_other", NULL};
struct fuse_args args = FUSE_ARGS_INIT(3, argv);
ret = mkdir(TZIP_ROOT_PATH, 0755);