In preparation for dynamically allocated ABS axis, introduce a number of sttaic inline access helpers. This should make the transition less painful. Signed-off-by: Daniel Mack <daniel@xxxxxxxx> Cc: Dmitry Torokhov <dtor@xxxxxxx> --- include/linux/input.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) diff --git a/include/linux/input.h b/include/linux/input.h index 0e41f77..ff1ee6d 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -1188,6 +1188,66 @@ struct input_dev { }; #define to_input_dev(d) container_of(d, struct input_dev, dev) +static inline int input_abs(struct input_dev *dev, int axis) +{ + return dev->abs[axis]; +} + +static inline int input_abs_max(struct input_dev *dev, int axis) +{ + return dev->absmax[axis]; +} + +static inline int input_abs_min(struct input_dev *dev, int axis) +{ + return dev->absmin[axis]; +} + +static inline int input_abs_fuzz(struct input_dev *dev, int axis) +{ + return dev->absfuzz[axis]; +} + +static inline int input_abs_flat(struct input_dev *dev, int axis) +{ + return dev->absflat[axis]; +} + +static inline int input_abs_res(struct input_dev *dev, int axis) +{ + return dev->absres[axis]; +} + +static inline void input_abs_set(struct input_dev *dev, int axis, int val) +{ + dev->abs[axis] = val; +} + +static inline void input_abs_set_max(struct input_dev *dev, int axis, int val) +{ + dev->absmax[axis] = val; +} + +static inline void input_abs_set_min(struct input_dev *dev, int axis, int val) +{ + dev->absmin[axis] = val; +} + +static inline void input_abs_set_fuzz(struct input_dev *dev, int axis, int val) +{ + dev->absfuzz[axis] = val; +} + +static inline void input_abs_set_flat(struct input_dev *dev, int axis, int val) +{ + dev->absflat[axis] = val; +} + +static inline void input_abs_set_res(struct input_dev *dev, int axis, int val) +{ + dev->absres[axis] = val; +} + /* * Verify that we are in sync with input_device_id mod_devicetable.h #defines */ -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html