Question on registering driver fops

Ezequiel García elezegarcia at gmail.com
Sat Feb 18 13:40:14 EST 2012


2012/2/15 Bjørn Mork <bjorn at mork.no>:
> IMPORT{program}="v4l_id $tempnode"
>
>
> So yes, looks like udev will open your device when it's plugged.
>

Thanks! I checked that and you are right. It is also possible to stop
udev service and
then insert the device. In this case, the device is not opened after
plugging it.

Looking at easycap_usb_probe() I guess we could just remove this comment
(or at least fix it) since it *not* videodev who calls easycap_open():

/*
 *  IT IS ESSENTIAL TO INITIALIZE THE HARDWARE BEFORE, RATHER THAN AFTER,
 *  THE DEVICE IS REGISTERED, BECAUSE SOME VERSIONS OF THE videodev MODULE
 *  CALL easycap_open() IMMEDIATELY AFTER REGISTRATION, CAUSING A CLASH.
 *  BEWARE.
*/

Another question: when does udev recognizes that this device was plugged?
Probably somewhere inside video_register_device(), right?

Thanks,
Ezequiel.



More information about the Kernelnewbies mailing list