From: Pete Zaitcev <zaitcev@redhat.com>
To: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
Cc: linux-kernel@vger.kernel.org, zaitcev@redhat.com
Subject: Re: input.c: start on release
Date: Fri, 23 Feb 2007 16:44:24 -0800 [thread overview]
Message-ID: <20070223164424.0454e11e.zaitcev@redhat.com> (raw)
In-Reply-To: <d120d5000702230706u4e7576du6661ce1b58e058aa@mail.gmail.com>
On Fri, 23 Feb 2007 10:06:14 -0500, "Dmitry Torokhov" <dmitry.torokhov@gmail.com> wrote:
> On 2/23/07, Pete Zaitcev <zaitcev@redhat.com> wrote:
> > void input_release_device(struct input_handle *handle)
> > {
> > ....
> > if (handle->handler->start)
> > handle->handler->start(handle);
> It should be ->start(). You are probably confused a little by the name
> of the function. input_release_device() is called when userspace
> issues ioctl(fd, EVIOCGRAB, 0) releasing (or ungrabbing) the device
> (as opposed to xxx_release(file, inode) type functions that are called
> when last user of a file drops off). In our case we want to give
> handlers a chance to resume their control over device. Right now
> standard keyboard driver uses start method do bring back in sync LED
> state of a keyborad-like device after it was released (ungrabbed).
Thanks for the explanation. I suspect people asked you 100 times before.
I can see why we would want to do this when a grab ends, but why do
we do this on every close of /dev/input/mice? The call path is:
mousedev_release ->
mixdev_release (optional for some majors)
input_close_device ->
input_release_device
Same thing happens upon disconnect, though this is probably harmless,
as the device is gone already anyway.
To tell you the truth, all I really want is to hold a static mutex
across a call to input_close_device(). Can I do that?
-- Pete
next prev parent reply other threads:[~2007-02-24 0:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-23 5:29 input.c: start on release Pete Zaitcev
2007-02-23 15:06 ` Dmitry Torokhov
2007-02-24 0:44 ` Pete Zaitcev [this message]
2007-02-24 16:57 ` Dmitry Torokhov
2007-02-24 19:27 ` Pete Zaitcev
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=20070223164424.0454e11e.zaitcev@redhat.com \
--to=zaitcev@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.