Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 885fb73a authored by Fenglin Wu's avatar Fenglin Wu
Browse files

input: qcom-hv-haptics: correct pattern source checking logic



The pattern source check before loading predefined effect is incorrect.
Correct it.

Change-Id: I8026f6ee24ce17dfe43bc514eeb526300af99746
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent 0cfe1003
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -884,8 +884,8 @@ static int haptics_load_predefined_effect(struct haptics_chip *chip,
		return rc;

	play->pattern_src = play->effect->src;
	if (play->pattern_src != PATTERN1 ||
			play->pattern_src != PATTERN2 ||
	if (play->pattern_src != PATTERN1 &&
			play->pattern_src != PATTERN2 &&
			play->pattern_src != FIFO) {
		dev_err(chip->dev, "pattern src %d can't be used for predefined effect\n",
				play->pattern_src);