On Fri, Jan 22, 2010 at 12:48 PM, Mauro Carvalho Chehab
<mche...@infradead.org> wrote:
>>>>     if (stv090x_i2c_gate_ctrl(fe, 1) < 0)
>>>>         goto err;
>>>>
>>>>     tuner access
>>>>
>>>>     if (stv090x_i2c_gate_ctrl(fe, 0) < 0)
>>>>         goto err;
>>> Ok. It is very unusual to have a lock internally like the above, since
>>> the code becomes poorly documented.
>>
>>
>> That's how a tuner is accessed for "any" dvb device.
>
> Yes, but that's not a function is expect to behave. In general, functions 
> handle
> the lock/unlock inside it, returning the mutex unlocked.

I'm confused - isn't this how pretty much *every* frontend does it's
locking?  The i2c_gate_ctrl() callback is a standard component in the
DVB API.  How is what Manu is doing different than any of the other
DVB drivers?

While I agree that the name "i2c_gate_ctrl" is not what I would have
chosen, as far as I can tell this is how every DVB frontend does it.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to