From: Benjamin Tissoires Date: Wed, 14 Nov 2012 15:59:14 +0000 (+0100) Subject: HID: round return value of hidinput_calc_abs_res X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~36^2^4~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccdd699411b77c463022ebac311eb4a06ca56db4;p=pandora-kernel.git HID: round return value of hidinput_calc_abs_res hidinput_calc_abs_res should return the closest int in the division instead of the floor. On a device with a logical_max of 3008 and a physical_max of 255mm, previous implementation gave a resolution of 11 instead of 12. With 11, user-space computes a physical size of 273.5mm and the round_closest results gives 250.6mm. The old implementation introduced an error of 2cm in this example. Signed-off-by: Benjamin Tissoires Acked-by: Jiri Kosina Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed