lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Properly assign return value of clamp() macro.
On Mon, May 23, 2011 at 09:58:34PM +0200, Hans Petter Selasky wrote:
> From 2b7fc579e802357b7b0742bf6bbbabdaf9e40c1e Mon Sep 17 00:00:00 2001
> From: Hans Petter Selasky <hselasky@c2i.net>
> Date: Mon, 23 May 2011 21:54:42 +0200
> Subject: [PATCH] Properly assign return value of clamp() macro.
>
> Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>

Applied, thanks Hans Peter. I am not sure why I thought clamp() was
modifying its argument... I added similar change to mousedev as well.

> ---
> drivers/input/input.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index ebbceed..e3c88fc 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -1757,7 +1757,7 @@ static unsigned int
> input_estimate_events_per_packet(struct input_dev *dev)
> } else if (test_bit(ABS_MT_TRACKING_ID, dev->absbit)) {
> mt_slots = dev->absinfo[ABS_MT_TRACKING_ID].maximum -
> dev->absinfo[ABS_MT_TRACKING_ID].minimum + 1,
> - clamp(mt_slots, 2, 32);
> + mt_slots = clamp(mt_slots, 2, 32);
> } else if (test_bit(ABS_MT_POSITION_X, dev->absbit)) {
> mt_slots = 2;
> } else {

--
Dmitry


\
 
 \ /
  Last update: 2011-05-25 18:21    [W:0.041 / U:3.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site