Navigation Menu

Skip to content

Commit

Permalink
[worker] Make internal module state data static
Browse files Browse the repository at this point in the history
Global data is problematic in general and these values have accessor
functions anyway and thus there is no reason for extern visibility.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Sep 5, 2018
1 parent 700b8f5 commit 08075fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/usb_moded-worker.c
Expand Up @@ -253,7 +253,7 @@ static bool worker_switch_to_charging(void)
* ------------------------------------------------------------------------- */

/** The module name for the specific mode */
char *worker_kernel_module = NULL;
static char *worker_kernel_module = NULL;

/** get the supposedly loaded module
*
Expand Down Expand Up @@ -311,7 +311,7 @@ void worker_clear_kernel_module(void)
* ------------------------------------------------------------------------- */

/** Contains the mode data */
struct mode_list_elem *worker_mode_data = NULL;
static struct mode_list_elem *worker_mode_data = NULL;

/** get the usb mode data
*
Expand Down Expand Up @@ -343,9 +343,9 @@ void worker_set_usb_mode_data(struct mode_list_elem *data)
*
* For example internal_mode=MODE_ASK gets
* mapped to hardware_mode=MODE_CHARGING */
gchar *worker_requested_mode = NULL;
static gchar *worker_requested_mode = NULL;

gchar *worker_activated_mode = NULL;
static gchar *worker_activated_mode = NULL;

static const char *
worker_get_activated_mode_locked(void)
Expand Down

0 comments on commit 08075fa

Please sign in to comment.