Hello Markus,

Markus Rechberger wrote:
> Could anyone comment or add this patch?
> 
> thanks,
> Markus
> 
>> +int dvb_frontend_eventstatus(struct dvb_frontend *fe)
>> +{
>> +      struct dvb_frontend_private *fepriv = fe->frontend_priv;
>> +      struct dvb_fe_events *events = &fepriv->events;
>> +      int ret;
>> +
>> +      if (mutex_lock_interruptible (&events->mtx))
>> +              return -EINTR;
>> +
>> +      ret = (fepriv->thread) ? true:false;
>> +      mutex_unlock (&events->mtx);
>> +
>> +      return ret;
>> +}

what does the mutex protect? Wouldn't the following code do the same?

int dvb_frontend_eventstatus(struct dvb_frontend *fe)
{
        struct dvb_frontend_private *fepriv = fe->frontend_priv;

        return (fepriv->thread != NULL);
}

I think the function name is misleading. At least it's not obvious for
me how the code relates to frontend events. A better name might be
dvb_frontend_active() or _running().

Best regards,
Andreas

_______________________________________________
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

Reply via email to