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

Commit 92310474 authored by Harvey Harrison's avatar Harvey Harrison Committed by Dmitry Torokhov
Browse files

Input: use clamp_val() macro in ff-memless.c



Replace two opencoded nested min/max macros with clamp_val().

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent c6a3ead2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -247,9 +247,9 @@ static void ml_combine_effects(struct ff_effect *effect,
		 * in s8, this should be changed to something more generic
		 */
		effect->u.ramp.start_level =
			max(min(effect->u.ramp.start_level + x, 0x7f), -0x80);
			clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f);
		effect->u.ramp.end_level =
			max(min(effect->u.ramp.end_level + y, 0x7f), -0x80);
			clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f);
		break;

	case FF_RUMBLE: