* Input: seeking internal API recommendation
@ 2005-09-08 16:51 Dmitry Torokhov
0 siblings, 0 replies; only message in thread
From: Dmitry Torokhov @ 2005-09-08 16:51 UTC (permalink / raw)
To: Vojtech Pavlik; +Cc: linux-input, LKML
Hi Vojtech,
I would like to lighten input_dev structure a bit and only allocate
memory for abs{val|min|max|flat|fuzz} for devices that are going to
generate absolute events. It will save 1260 bytes for every input
device registered.
If you remember I was also working on converting input devices to
sysfs (it progresses very nicely, I will post patches soon). As part
of that conversion I have a function input_allocate_device that
returns new input_dev structure. To ease error handling in individual
drivers I would like to have all memory allocation go into that
function. Plus we might switch other parts of input_dev to dynamic
allocation. So I see basically 2 possible options:
struct input_dev *input_allocate_device(int evbits); or
struct input_dev *input_allocate_device(int evbit,...)
The first form will not be sufficient if we ever go past 31 event
types, but I like it better than varargs.
Any suggestions?
--
Dmitry
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-08 16:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-08 16:51 Input: seeking internal API recommendation Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox