linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aniroop Mathur <aniroop.mathur@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Subject: Re: [Question: Drivers/input/evdev.c] How to get instance of struct evdev in some driver ?
Date: Sun, 3 Aug 2014 12:23:00 +0530	[thread overview]
Message-ID: <CADYu30-_ozzaNroEC4---R8o=uAq7sMuFzxoCkWpw=S4fE1bKA@mail.gmail.com> (raw)
In-Reply-To: <20140803064238.GA897@core.coreip.homeip.net>

Hi Mr. Torokhov,

Thank you for your quick reply and clearing my doubt. :)

On Sun, Aug 3, 2014 at 12:12 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Aniroop,
>
> On Sun, Aug 03, 2014 at 12:05:11PM +0530, Aniroop Mathur wrote:
>> Dear Mr. Torokhov and Linux-Input Community,
>> Greetings of the day !! :)
>>
>> I am stuck at one point and could not find the solution over internet.
>> Can you please help in answering my query below:
>>
>> As you know, struct evdev is defined in evdev.c and not in some header file.
>> So, Is it possible to get instance of struct evdev in some input
>> peripheral driver ?
>> If possible, then how can we get it ?
>>
>> In the input peripheral driver,
>> we can get instance struct input_dev by including input.h file
>> and then calling input_allocate_device().
>> struct input_dev = input_allocate_device();
>>
>> May be evdev is embedded somewhere in input_dev.
>> So, can we get the instance of evdev using input_dev ?
>
> Not really. Technically speaking the evdev cam be compiled as a module and it
> will not be bound to the input device until later.
>
> Input devices should be ignorant of the input handlers bound to them, they
> should just supply event stream and not care about anything else. Also evdev
> internal structure is exactly that - internal - and the rest of the kernel
> should not try to poke into it.
>
> Thanks.
>
> --
> Dmitry

      reply	other threads:[~2014-08-03  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-03  6:35 [Question: Drivers/input/evdev.c] How to get instance of struct evdev in some driver ? Aniroop Mathur
2014-08-03  6:42 ` Dmitry Torokhov
2014-08-03  6:53   ` Aniroop Mathur [this message]

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='CADYu30-_ozzaNroEC4---R8o=uAq7sMuFzxoCkWpw=S4fE1bKA@mail.gmail.com' \
    --to=aniroop.mathur@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).