summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorKenneth Kwak <kkwak@nvidia.com>2014-04-22 18:38:29 +0900
committerPeter Kim <pekim@nvidia.com>2014-06-12 21:53:56 -0700
commite5ab87ee1c4f0c3f8557ddde3be07d43b94aae07 (patch)
treed2e690bf2e64d9f453eee523d9cba39f767ca92b /drivers
parent31223fc9c52af0713f7409cbbd7255fe287bf563 (diff)
HID: Exporting hidinput_calc_ads_res
Export hidinput_calc_abs_res to allow us to calculate resolution in other drivers. Only getting exporting code from (commit id: 37cf6e6fc34e2fca4e7c565697e7cd5c317bc316) Bug 1466757 Change-Id: Ic07922fa53f26634c3b402d669256e03c45f4789 Signed-off-by: Kenneth Kwak <kkwak@nvidia.com> Reviewed-on: http://git-master/r/401209 Signed-off-by: Kenneth Kwak <kkwak@nvidia.com> Reviewed-on: http://git-master/r/417519 Reviewed-by: Peter Kim <pekim@nvidia.com> Tested-by: Peter Kim <pekim@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 43669731afc9..89eeb6d61329 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -208,7 +208,7 @@ static int hidinput_setkeycode(struct input_dev *dev,
* Only exponent 1 length units are processed. Centimeters and inches are
* converted to millimeters. Degrees are converted to radians.
*/
-static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
+__s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
{
__s32 unit_exponent = field->unit_exponent;
__s32 logical_extents = field->logical_maximum -
@@ -272,6 +272,7 @@ static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
/* Calculate resolution */
return logical_extents / physical_extents;
}
+EXPORT_SYMBOL_GPL(hidinput_calc_abs_res);
#ifdef CONFIG_HID_BATTERY_STRENGTH
static enum power_supply_property hidinput_battery_props[] = {