Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[powerkey] Normalize function naming
Fix naming inconsistencies and add missing prototypes.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Mar 14, 2019
1 parent 151c7f7 commit 4b25492
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions powerkey.c
Expand Up @@ -525,7 +525,7 @@ static void pwrkey_setting_quit (void);
* reacting to state changes / input from other mce modules
* ------------------------------------------------------------------------- */

static void pwrkey_datapipes_keypress_event_cb(gconstpointer const data);
static void pwrkey_datapipe_keypress_event_cb(gconstpointer const data);
static void pwrkey_datapipe_ngfd_service_state_cb(gconstpointer data);
static void pwrkey_datapipe_system_state_cb(gconstpointer data);
static void pwrkey_datapipe_display_state_curr_cb(gconstpointer data);
Expand All @@ -534,9 +534,12 @@ static void pwrkey_datapipe_lid_sensor_filtered_cb(gconstpointer data);
static void pwrkey_datapipe_proximity_sensor_actual_cb(gconstpointer data);
static void pwrkey_datapipe_call_state_cb(gconstpointer data);
static void pwrkey_datapipe_alarm_ui_state_cb(gconstpointer data);
static void pwrkey_datapipe_devicelock_service_state_cb(gconstpointer data);
static void pwrkey_datapipe_enroll_in_progress_cb(gconstpointer data);
static void pwrkey_datapipe_ngfd_event_request_cb(gconstpointer data);

static void pwrkey_datapipes_init(void);
static void pwrkey_datapipes_quit(void);
static void pwrkey_datapipe_init(void);
static void pwrkey_datapipe_quit(void);

/* ------------------------------------------------------------------------- *
* MODULE_INTEFACE
Expand Down Expand Up @@ -2896,7 +2899,7 @@ pwrkey_datapipe_ngfd_service_state_cb(gconstpointer data)
* @param data A pointer to the input_event struct
*/
static void
pwrkey_datapipes_keypress_event_cb(gconstpointer const data)
pwrkey_datapipe_keypress_event_cb(gconstpointer const data)
{
/* Faulty/aged physical power key buttons can generate
* bursts of press and release events that are then
Expand Down Expand Up @@ -3097,7 +3100,7 @@ static void pwrkey_datapipe_enroll_in_progress_cb(gconstpointer data)
*
* @param data Requested event name (as void pointer)
*/
static void fba_datapipe_ngfd_event_request_cb(gconstpointer data)
static void pwrkey_datapipe_ngfd_event_request_cb(gconstpointer data)
{
const char *event = data;
mce_log(LL_DEBUG, "ngfd event request = %s", event);
Expand All @@ -3110,11 +3113,11 @@ static datapipe_handler_t pwrkey_datapipe_handlers[] =
// input triggers
{
.datapipe = &keypress_event_pipe,
.input_cb = pwrkey_datapipes_keypress_event_cb,
.input_cb = pwrkey_datapipe_keypress_event_cb,
},
{
.datapipe = &ngfd_event_request_pipe,
.input_cb = fba_datapipe_ngfd_event_request_cb,
.input_cb = pwrkey_datapipe_ngfd_event_request_cb,
},
// output triggers
{
Expand Down Expand Up @@ -3172,15 +3175,15 @@ static datapipe_bindings_t pwrkey_datapipe_bindings =
/** Append triggers/filters to datapipes
*/
static void
pwrkey_datapipes_init(void)
pwrkey_datapipe_init(void)
{
mce_datapipe_init_bindings(&pwrkey_datapipe_bindings);
}

/** Remove triggers/filters from datapipes
*/
static void
pwrkey_datapipes_quit(void)
pwrkey_datapipe_quit(void)
{
mce_datapipe_quit_bindings(&pwrkey_datapipe_bindings);
}
Expand Down Expand Up @@ -3320,7 +3323,7 @@ xngf_quit(void)
*/
gboolean mce_powerkey_init(void)
{
pwrkey_datapipes_init();
pwrkey_datapipe_init();

pwrkey_dbus_init();

Expand All @@ -3344,7 +3347,7 @@ void mce_powerkey_exit(void)

pwrkey_setting_quit();

pwrkey_datapipes_quit();
pwrkey_datapipe_quit();

/* Remove all timer sources & release wakelock */
pwrkey_stm_terminate();
Expand Down

0 comments on commit 4b25492

Please sign in to comment.