diff options
author | Paul Keith <javelinanddart@gmail.com> | 2017-12-31 02:17:32 +0100 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-10-23 01:12:56 +0300 |
commit | 23dc599d41a3c9952852e7564c8b5e5e0cbbf931 (patch) | |
tree | 9208544b6ce9b13236e9baf6e1ed8a8c4d2dead6 /power-common.c | |
parent | 45df97b4a01aaf7fd6e2df17126bd53e59e0099a (diff) | |
download | vendor_qcom_opensource_power-23dc599d41a3c9952852e7564c8b5e5e0cbbf931.tar.gz vendor_qcom_opensource_power-23dc599d41a3c9952852e7564c8b5e5e0cbbf931.tar.bz2 vendor_qcom_opensource_power-23dc599d41a3c9952852e7564c8b5e5e0cbbf931.zip |
power: Fix a few compiler warnings
* And unify styling a little bit
Change-Id: I7f9bb43a534e352fdd7693ff975749864f8addb3
Diffstat (limited to 'power-common.c')
-rw-r--r-- | power-common.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/power-common.c b/power-common.c index 1dc9334..6c1e40f 100644 --- a/power-common.c +++ b/power-common.c @@ -77,11 +77,9 @@ void power_hint(power_hint_t hint, void *data) return; } switch(hint) { - case POWER_HINT_VSYNC: - break; case POWER_HINT_VR_MODE: ALOGI("VR mode power hint not handled in power_hint_override"); - break; + break; case POWER_HINT_INTERACTION: { int resources[] = {0x702, 0x20F, 0x30F}; @@ -99,15 +97,18 @@ void power_hint(power_hint_t hint, void *data) if (handles[hint].handle > 0) handles[hint].ref_count++; - } - else - if (handles[hint].handle > 0) + } else { + if (handles[hint].handle > 0) { if (--handles[hint].ref_count == 0) { release_request(handles[hint].handle); handles[hint].handle = 0; } - else + } else { ALOGE("Lock for hint: %X was not acquired, cannot be released", hint); + } + } + break; + default: break; } } |