This is a note to let you know that I've just added the patch titled Input: properly assign return value of clamp() macro.
to the 2.6.39-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: input-properly-assign-return-value-of-clamp-macro.patch and it can be found in the queue-2.6.39 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <sta...@kernel.org> know about it. >From 8c127f0717b438e6abc3d92d4ae248c4224b9dcb Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky <hsela...@c2i.net> Date: Wed, 25 May 2011 09:24:32 -0700 Subject: Input: properly assign return value of clamp() macro. From: Hans Petter Selasky <hsela...@c2i.net> commit 8c127f0717b438e6abc3d92d4ae248c4224b9dcb upstream. [d...@mail.ru: added mousedev changes] Signed-off-by: Hans Petter Selasky <hsela...@c2i.net> Signed-off-by: Dmitry Torokhov <d...@mail.ru> Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> --- drivers/input/input.c | 2 +- drivers/input/mousedev.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1757,7 +1757,7 @@ static unsigned int input_estimate_event } 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 { --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c @@ -187,7 +187,7 @@ static void mousedev_abs_event(struct in if (size == 0) size = xres ? : 1; - clamp(value, min, max); + value = clamp(value, min, max); mousedev->packet.x = ((value - min) * xres) / size; mousedev->packet.abs_event = 1; @@ -201,7 +201,7 @@ static void mousedev_abs_event(struct in if (size == 0) size = yres ? : 1; - clamp(value, min, max); + value = clamp(value, min, max); mousedev->packet.y = yres - ((value - min) * yres) / size; mousedev->packet.abs_event = 1; Patches currently in stable-queue which might be from hsela...@c2i.net are queue-2.6.39/input-properly-assign-return-value-of-clamp-macro.patch _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable