From: elezegarcia@gmail.com (Ezequiel García)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [question] between probe() and open()
Date: Sat, 25 Feb 2012 19:09:49 -0300 [thread overview]
Message-ID: <CALF0-+W7epb+-qFq_OLX0BoMTjszZ81-owo8HT4wr2-emqgNwQ@mail.gmail.com> (raw)
Hello,
This is a question in general about usb drivers and
in particular about easycap driver.
Is there any way a driver can be accesed
between after usb_probe() but before device open()?
I guess not, since any further operation on
the device needs a struct file pointer, i.e. a file descriptor on
the user side.
In particular:
easycap driver currently calls reset() on usb_probe(),
reset() does some hardware initialization among other stuff.
However, the reset() is called once again on open().
This seems redundant, right?
The reset() is a heavy function since it access the hardware, so
it would be benefitial to change it,
but I would like someone to ack this, since it is not so trivial.
Some measures on the device shows how heavy the reset() is:
# calling reset() on usb_probe()
time modprobe easycap
real 0m1.516s
user 0m0.000s
sys 0m0.009s
---
# not calling reset() on usb_probe()
time modprobe easycap
real 0m0.003s
user 0m0.000s
sys 0m0.002s
Thanks,
Ezequiel.
reply other threads:[~2012-02-25 22:09 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=CALF0-+W7epb+-qFq_OLX0BoMTjszZ81-owo8HT4wr2-emqgNwQ@mail.gmail.com \
--to=elezegarcia@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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).