aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/input
diff options
context:
space:
mode:
authorHenrik Rydberg <rydberg@euromail.se>2012-01-12 13:40:34 -0500
committerHenrik Rydberg <rydberg@euromail.se>2012-02-02 08:42:20 -0500
commitb89529a10c954f14191367355da2a6053c49abb9 (patch)
tree89b69d46d9ce55cf96d8586a9468de3fb5fbb694 /include/linux/input
parent62aa2b537c6f5957afd98e29f96897419ed5ebab (diff)
Input: Use accessor for MT values
The current MT accessor function does not distinguish between the MT values and the slot specification event. Add an accessor function for the values only, and use it where appropriate. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Diffstat (limited to 'include/linux/input')
-rw-r--r--include/linux/input/mt.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/input/mt.h b/include/linux/input/mt.h
index 318bb82325a..f86737586e1 100644
--- a/include/linux/input/mt.h
+++ b/include/linux/input/mt.h
@@ -48,10 +48,14 @@ static inline void input_mt_slot(struct input_dev *dev, int slot)
48 input_event(dev, EV_ABS, ABS_MT_SLOT, slot); 48 input_event(dev, EV_ABS, ABS_MT_SLOT, slot);
49} 49}
50 50
51static inline bool input_is_mt_value(int axis)
52{
53 return axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST;
54}
55
51static inline bool input_is_mt_axis(int axis) 56static inline bool input_is_mt_axis(int axis)
52{ 57{
53 return axis == ABS_MT_SLOT || 58 return axis == ABS_MT_SLOT || input_is_mt_value(axis);
54 (axis >= ABS_MT_FIRST && axis <= ABS_MT_LAST);
55} 59}
56 60
57void input_mt_report_slot_state(struct input_dev *dev, 61void input_mt_report_slot_state(struct input_dev *dev,