On Thursday 02 April 2009 20:25:10 Alexey Klimov wrote: > On Thu, Apr 2, 2009 at 11:29 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote: > > [...] > > >> So, questions are: > >> > >> 1) What for is lock/unlock_kernel() used in open? > > > > It's pointless. Just remove it. > > Actually, i can see lock/unlock_kernel() in open in other V4L drivers too. > What for is it used in other drivers? If I remember correctly these lock/unlock_kernel() calls were originally handled in the part of the kernel that calls us in turn. An effort was made not too long ago to move it this out of the core kernel and into each driver, allowing each driver to replace these calls by proper mutexes, or remove it altogether if it isn't needed. I strongly suspect that in 80-90% of the cases the v4l driver does not actually need to use it and in the remaining 10-20% it can be replaced by a regular mutex. Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by TANDBERG -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html