diff options
Diffstat (limited to 'drivers/input/ff-memless.c')
-rw-r--r-- | drivers/input/ff-memless.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/ff-memless.c b/drivers/input/ff-memless.c index d226d935b0dc..6790e975a98c 100644 --- a/drivers/input/ff-memless.c +++ b/drivers/input/ff-memless.c | |||
@@ -247,9 +247,9 @@ static void ml_combine_effects(struct ff_effect *effect, | |||
247 | * in s8, this should be changed to something more generic | 247 | * in s8, this should be changed to something more generic |
248 | */ | 248 | */ |
249 | effect->u.ramp.start_level = | 249 | effect->u.ramp.start_level = |
250 | max(min(effect->u.ramp.start_level + x, 0x7f), -0x80); | 250 | clamp_val(effect->u.ramp.start_level + x, -0x80, 0x7f); |
251 | effect->u.ramp.end_level = | 251 | effect->u.ramp.end_level = |
252 | max(min(effect->u.ramp.end_level + y, 0x7f), -0x80); | 252 | clamp_val(effect->u.ramp.end_level + y, -0x80, 0x7f); |
253 | break; | 253 | break; |
254 | 254 | ||
255 | case FF_RUMBLE: | 255 | case FF_RUMBLE: |