[RFC] linux-input: dynamically allocate ABS axis information

From: Daniel Mack
Date: Wed May 19 2010 - 13:23:35 EST


To support more axis on input devices, we should dynamically allocate
ABS axis information. Currently, six values (value, min, max, fuzz,
flat and resolution) are stored in arrays, each of ABS_CNT elements.

The following four patches makes the input core reuse the input_absinfo
struct and only carry one pointer per axis. These structs are allocated
on demand now, making it less painful to add new ABS axis eventually.

As everything is now nicely abstracted, we might even move over to a
more efficient storage than a linear pointer, but that can be done
later.

I successfully tested this on my desktop machine here.

Let me know what you think.

Thanks,
Daniel

[PATCH 1/4] input: use ABS_CNT rather than (ABS_MAX + 1)
[PATCH 2/4] input: add static inline helpers for ABS properties
[PATCH 3/4] input: switch to input_abs_*() access functions
[PATCH 4/4] input: dynamically allocate ABS information
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/