Skip to content

Commit

Permalink
Use common prefix for global functions defined in mce-dsme.c
Browse files Browse the repository at this point in the history
  • Loading branch information
spiiroin committed Jun 17, 2014
1 parent 60e6d0d commit 6217ae8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions mce-dsme.c
Expand Up @@ -204,7 +204,7 @@ static void mce_dsme_query_system_state(void)
/**
* Request powerup
*/
void request_powerup(void)
void mce_dsme_request_powerup(void)
{
/* Set up the message */
DSM_MSGTYPE_POWERUP_REQ msg = DSME_MSG_INIT(DSM_MSGTYPE_POWERUP_REQ);
Expand All @@ -216,7 +216,7 @@ void request_powerup(void)
/**
* Request reboot
*/
void request_reboot(void)
void mce_dsme_request_reboot(void)
{
if( datapipe_get_gint(update_mode_pipe) ) {
mce_log(LL_WARN, "reboot blocked; os update in progress");
Expand All @@ -235,7 +235,7 @@ void request_reboot(void)
/**
* Request soft poweron
*/
void request_soft_poweron(void)
void mce_dsme_request_soft_poweron(void)
{
/* Disable the soft poweroff LED pattern */
execute_datapipe_output_triggers(&led_pattern_deactivate_pipe,
Expand All @@ -251,7 +251,7 @@ void request_soft_poweron(void)
/**
* Request soft poweroff
*/
void request_soft_poweroff(void)
void mce_dsme_request_soft_poweroff(void)
{
mce_add_submode_int32(MCE_SOFTOFF_SUBMODE);
execute_datapipe(&display_state_req_pipe,
Expand Down Expand Up @@ -317,7 +317,7 @@ static void mce_dsme_schedule_state_report(void)
/**
* Request normal shutdown
*/
void request_normal_shutdown(void)
void mce_dsme_request_normal_shutdown(void)
{
if( datapipe_get_gint(update_mode_pipe) ) {
mce_log(LL_WARN, "shutdown blocked; os update in progress");
Expand Down Expand Up @@ -527,7 +527,7 @@ static void mce_dsme_charger_state_cb(gconstpointer const data)

if ((submode & MCE_SOFTOFF_SUBMODE) != 0) {
if (softoff_charger_connect_policy == SOFTOFF_CHARGER_CONNECT_WAKEUP) {
request_soft_poweron();
mce_dsme_request_soft_poweron();
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions mce-dsme.h
Expand Up @@ -60,11 +60,11 @@ enum {
DEFAULT_SOFTOFF_CHARGER_CONNECT = SOFTOFF_CHARGER_CONNECT_IGNORE,
};

void request_powerup(void);
void request_reboot(void);
void request_soft_poweron(void);
void request_soft_poweroff(void);
void request_normal_shutdown(void);
void mce_dsme_request_powerup(void);
void mce_dsme_request_reboot(void);
void mce_dsme_request_soft_poweron(void);
void mce_dsme_request_soft_poweroff(void);
void mce_dsme_request_normal_shutdown(void);

/* When MCE is made modular, this will be handled differently */
gboolean mce_dsme_init(void);
Expand Down
10 changes: 5 additions & 5 deletions powerkey.c
Expand Up @@ -295,14 +295,14 @@ static void generic_powerkey_handler(poweraction_t action,
*/
if ((submode & MCE_TKLOCK_SUBMODE) == 0) {
mce_log(LL_DEVEL, "Requesting shutdown");
request_normal_shutdown();
mce_dsme_request_normal_shutdown();
}
break;

case POWER_SOFT_POWEROFF:
/* Only soft poweroff if the tklock isn't active */
if ((submode & MCE_TKLOCK_SUBMODE) == 0) {
request_soft_poweroff();
mce_dsme_request_soft_poweroff();
}

break;
Expand Down Expand Up @@ -527,15 +527,15 @@ static gboolean handle_longpress(void)
execute_datapipe_output_triggers(&led_pattern_activate_pipe,
MCE_LED_PATTERN_POWER_ON,
USE_INDATA);
request_powerup();
mce_dsme_request_powerup();
break;

case MCE_STATE_USER:
/* If softoff is enabled, wake up
* Otherwise, perform long press action
*/
if ((submode & MCE_SOFTOFF_SUBMODE)) {
request_soft_poweron();
mce_dsme_request_soft_poweron();
} else {
generic_powerkey_handler(longpressaction,
longpresssignal);
Expand All @@ -551,7 +551,7 @@ static gboolean handle_longpress(void)
"Requesting shutdown; state: %d",
state);

request_normal_shutdown();
mce_dsme_request_normal_shutdown();
break;
}

Expand Down

0 comments on commit 6217ae8

Please sign in to comment.