From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: linux-input@atrey.karlin.mff.cuni.cz,
LKML <linux-kernel@vger.kernel.org>
Subject: Input: seeking internal API recommendation
Date: Thu, 8 Sep 2005 11:51:41 -0500 [thread overview]
Message-ID: <d120d50005090809517daef043@mail.gmail.com> (raw)
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
reply other threads:[~2005-09-08 16:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d120d50005090809517daef043@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=dtor_core@ameritech.net \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox