mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
fixup! (CR): aw8697: Add error checking to RTP mode
Due to llvm is updated to 10.0.3, this would report build error l(CR): +++ /mnt/rider/a7301c/R_8250/kernel/msm-4.19/../../motorola/kernel/modules/drivers/misc/awinic/aw8697/aw8697.c:1353:10: warning: result of comparison of constant 0 with expression of type 'bool' (aka '_Bool') is always false [-Wtautological-constant-compare] +++ Change-Id: I4bc8ebe7829d060d34a06d09dbb7eeb39891731c Signed-off-by: a7301c <a7301c@motorola.com> Signed-off-by: Perry White <awhite6@motorola.com> Reviewed-on: https://gerrit.mot.com/1533709 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Submit-Approved: Jira Key Tested-by: Jira Key Reviewed-on: https://gerrit.mot.com/1540157
This commit is contained in:
parent
87223d1df0
commit
c2ac43a982
1 changed files with 7 additions and 6 deletions
|
|
@ -1347,10 +1347,11 @@ static unsigned char aw8697_haptic_rtp_get_fifo_afs(struct aw8697 *aw8697)
|
|||
static bool aw8697_check_error(struct aw8697 *aw8697)
|
||||
{
|
||||
unsigned char reg_val;
|
||||
int rc;
|
||||
bool ret = false;
|
||||
|
||||
aw8697_i2c_read(aw8697, AW8697_REG_SYSST, ®_val);
|
||||
if (ret < 0)
|
||||
rc = aw8697_i2c_read(aw8697, AW8697_REG_SYSST, ®_val);
|
||||
if (rc < 0)
|
||||
return true;
|
||||
|
||||
if (reg_val & AW8697_BIT_SYSST_UVLS) {
|
||||
|
|
@ -2529,17 +2530,17 @@ static void __maybe_unused aw8697_haptic_context(
|
|||
case HAPTIC_RTP:
|
||||
if (aw8697->info.rtp_gain)
|
||||
aw8697->gain = aw8697->info.rtp_gain;
|
||||
break;
|
||||
break;
|
||||
case HAPTIC_SHORT:
|
||||
if (aw8697->info.short_gain)
|
||||
aw8697->gain = aw8697->info.short_gain;
|
||||
break;
|
||||
break;
|
||||
case HAPTIC_LONG:
|
||||
if (aw8697->info.long_gain_reduced)
|
||||
aw8697->gain = aw8697->info.long_gain_reduced;
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue