Re: [PATCH] viafb camera controller driver

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

 



On Sat, 16 Oct 2010 10:44:56 -0300
Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote:

> drivers/media/video/via-camera.c: In function ‘viacam_open’:
> drivers/media/video/via-camera.c:651: error: too few arguments to function ‘videobuf_queue_sg_init’

> The fix for this one is trivial:
> drivers/media/video/via-camera.c:651: error: too few arguments to function ‘videobuf_queue_sg_init’
> 
> Just add an extra NULL parameter to the function.

So I'm looking into this stuff.  The extra NULL parameter is a struct
mutex, which seems to be used in one place in videobuf_waiton():

	is_ext_locked = q->ext_lock && mutex_is_locked(q->ext_lock);

	/* Release vdev lock to prevent this wait from blocking outside access to
	   the device. */
	if (is_ext_locked)
		mutex_unlock(q->ext_lock);

I'd be most curious to know what the reasoning behind this code is; to my
uneducated eye, it looks like a real hack.  How does this function know who
locked ext_lock?  Can it really just unlock it safely?  It seems to me that
this is a sign of locking issues which should really be dealt with
elsewhere, but, as I said, I'm uneducated, and the changelogs don't help me
much.  Can somebody educate me?

Thanks,

jon
--
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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux