Question on registering driver fops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El día 14 de febrero de 2012 19:42, Greg KH <greg@xxxxxxxxx> escribió:
> On Tue, Feb 14, 2012 at 07:05:48PM -0300, Ezequiel García wrote:
>> I noticed that after registering a video driver with
>> "video_register_device" the "open" function gets called.
>> The registration is like:
>>
>>         peasycap->video_device.fops = &v4l2_fops;
>>         peasycap->video_device.minor = -1;
>>         peasycap->video_device.release = (void *)(&videodev_release);
>>
>>         video_set_drvdata(&(peasycap->video_device), (void *)peasycap);
>>
>> First question: who calls it and why does it open the device?
>
> Userspace probably.
>

I find hard that userspace is who opens the device in this particular case,
because I get the "open" call just by plugging in the usb, right after
usb_probe.
(unless there is a daemon, or udev opens the device for module
insertion or something).

I will investigate this further.

Thanks,
Ezequiel.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux