From b1a506a4f2ed569593f7d1c8c42c79c9d8705f3c Mon Sep 17 00:00:00 2001 From: "Christopher N. Hesse" Date: Wed, 25 Jan 2017 22:41:05 +0100 Subject: [PATCH] power: Make boostpulse_warned static Change-Id: I8bd557c637402922702fcb75a1c0633947ded41a --- power/power.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/power/power.c b/power/power.c index 25aa3d6..ea7be5a 100644 --- a/power/power.c +++ b/power/power.c @@ -44,7 +44,6 @@ struct samsung_power_module { struct power_module base; pthread_mutex_t lock; int boostpulse_fd; - int boostpulse_warned; char cpu0_hispeed_freq[10]; char cpu0_max_freq[10]; char cpu4_hispeed_freq[10]; @@ -59,7 +58,9 @@ enum power_profile_e { PROFILE_BALANCED, PROFILE_HIGH_PERFORMANCE }; + static enum power_profile_e current_power_profile = PROFILE_BALANCED; +static bool boostpulse_warned = false; /********************************************************** *** HELPER FUNCTIONS @@ -129,10 +130,10 @@ static int boostpulse_open(struct samsung_power_module *samsung_pwr) if (samsung_pwr->boostpulse_fd < 0) { samsung_pwr->boostpulse_fd = open(BOOSTPULSE_PATH, O_WRONLY); if (samsung_pwr->boostpulse_fd < 0) { - if (!samsung_pwr->boostpulse_warned) { + if (!boostpulse_warned) { strerror_r(errno, errno_str, sizeof(errno_str)); ALOGE("Error opening %s: %s\n", BOOSTPULSE_PATH, errno_str); - samsung_pwr->boostpulse_warned = 1; + boostpulse_warned = true; } } } @@ -452,5 +453,4 @@ struct samsung_power_module HAL_MODULE_INFO_SYM = { .lock = PTHREAD_MUTEX_INITIALIZER, .boostpulse_fd = -1, - .boostpulse_warned = 0, }; -- 2.20.1