touchpad: constify a few helper functions

May help the compiler with further optimization

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2016-12-13 09:54:30 +10:00
parent d1d3ea4d06
commit 2a16c522b9
2 changed files with 5 additions and 3 deletions

View file

@ -476,7 +476,7 @@ tp_process_key(struct tp_dispatch *tp,
}
static void
tp_unpin_finger(struct tp_dispatch *tp, struct tp_touch *t)
tp_unpin_finger(const struct tp_dispatch *tp, struct tp_touch *t)
{
double xdist, ydist;

View file

@ -388,7 +388,8 @@ tp_libinput_context(const struct tp_dispatch *tp)
}
static inline struct normalized_coords
tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta)
tp_normalize_delta(const struct tp_dispatch *tp,
struct device_float_coords delta)
{
struct normalized_coords normalized;
@ -403,7 +404,8 @@ tp_normalize_delta(struct tp_dispatch *tp, struct device_float_coords delta)
* in the x-axis' coordinate space.
*/
static inline struct device_float_coords
tp_unnormalize_for_xaxis(struct tp_dispatch *tp, struct normalized_coords delta)
tp_unnormalize_for_xaxis(const struct tp_dispatch *tp,
struct normalized_coords delta)
{
struct device_float_coords raw;