[linux-dvb] cx24110 driver question/problem

Johannes Stezenbach js at linuxtv.org
Tue Jul 26 11:06:18 CEST 2005


Peter Hettkamp wrote:
> 
>        for (i=100; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
>                msleep(1); /* wait for LNB ready */

There is a small catch: With HZ==100 (configurable in 2.6.13-rc)
msleep(1) will sleep at least 10msecs. It might be better to:

       for (i=10; i-- > 0 && !(cx24110_readreg(state,0x76)&0x40);)
               msleep(10); /* wait for LNB ready */

But the correct solution is to use jiffies and time_after()
instead of a fixed loop counter.

Johannes




More information about the linux-dvb mailing list