diff options
author | Christopher N. Hesse <raymanfx@gmail.com> | 2017-01-25 22:41:05 +0100 |
---|---|---|
committer | Christopher N. Hesse <raymanfx@gmail.com> | 2017-01-30 22:07:31 +0000 |
commit | b1a506a4f2ed569593f7d1c8c42c79c9d8705f3c (patch) | |
tree | 0525ea6f1fc89ca7eb9179d431abf6fbfadc2a77 | |
parent | 40f30214187ecec04e121c9bf8c4b1e63ef8d609 (diff) | |
download | android_hardware_samsung-b1a506a4f2ed569593f7d1c8c42c79c9d8705f3c.tar.gz android_hardware_samsung-b1a506a4f2ed569593f7d1c8c42c79c9d8705f3c.tar.bz2 android_hardware_samsung-b1a506a4f2ed569593f7d1c8c42c79c9d8705f3c.zip |
power: Make boostpulse_warned static
Change-Id: I8bd557c637402922702fcb75a1c0633947ded41a
-rw-r--r-- | power/power.c | 8 |
1 files 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, }; |