From: Peter Hutterer Date: Wed, 6 Feb 2019 04:07:37 +0000 (+1000) Subject: filter: drop an unused function and an unused struct X-Git-Tag: 1.12.901~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b64828e79a4f3db824256c79f54f9f9697da5577;p=platform%2Fupstream%2Flibinput.git filter: drop an unused function and an unused struct Signed-off-by: Peter Hutterer --- diff --git a/src/filter-tablet.c b/src/filter-tablet.c index 128595f..24afb56 100644 --- a/src/filter-tablet.c +++ b/src/filter-tablet.c @@ -43,21 +43,6 @@ struct tablet_accelerator_flat { yres_scale; /* 1000dpi : tablet res */ }; -struct trackpoint_accelerator { - struct motion_filter base; - - struct device_float_coords history[4]; - size_t history_size; - - double scale_factor; - double max_accel; - double max_delta; - - double incline; /* incline of the function */ - double offset; /* offset of the function */ -}; - - static inline struct normalized_coords tablet_accelerator_filter_flat_mouse(struct tablet_accelerator_flat *filter, const struct device_float_coords *units) diff --git a/src/filter-touchpad-x230.c b/src/filter-touchpad-x230.c index 65fae37..d4cc3e1 100644 --- a/src/filter-touchpad-x230.c +++ b/src/filter-touchpad-x230.c @@ -129,37 +129,6 @@ calculate_acceleration(struct pointer_accelerator_x230 *accel, return factor; /* unitless factor */ } -/** - * Calculate the acceleration factor for the given delta with the timestamp. - * - * @param accel The acceleration filter - * @param unaccelerated The raw delta in the device's dpi - * @param data Caller-specific data - * @param time Current time in µs - * - * @return A unitless acceleration factor, to be applied to the delta - */ -static inline double -calculate_acceleration_factor(struct pointer_accelerator_x230 *accel, - const struct device_float_coords *unaccelerated, - void *data, - uint64_t time) -{ - double velocity; /* units/us in device-native dpi*/ - double accel_factor; - - trackers_feed(&accel->trackers, unaccelerated, time); - velocity = trackers_velocity(&accel->trackers, time); - accel_factor = calculate_acceleration(accel, - data, - velocity, - accel->last_velocity, - time); - accel->last_velocity = velocity; - - return accel_factor; -} - static struct normalized_coords accelerator_filter_x230(struct motion_filter *filter, const struct device_float_coords *raw,