[linux-dvb] Updated Mantis VP-2033 remote control patch for Manu's jusst.de Mantis branch

Pauli Borodulin pauli at borodulin.fi
Mon May 19 18:52:40 CEST 2008


Heya!

> On 5/17/08, Pauli Borodulin <pauli at borodulin.fi> wrote:
>> Since there has been some direct requests for this via email, I'm
>> posting a updated version of Kristian Slavov's original remote control
>> patch[1] for Manu's jusst.de Mantis branch. The new version is
>> functionally the same as the one I posted in March[2].
 >> [...]

Markus Rechberger wrote:
> +int mantis_rc_exit(struct mantis_pci *mantis)
>  +{
>  +        mmwrite(mmread(MANTIS_INT_MASK) & (~MANTIS_INT_IRQ1),
> MANTIS_INT_MASK);
>  +
>  +        cancel_delayed_work(&mantis->ir.rc_query_work);
>  +        input_unregister_device(mantis->ir.rc_dev);
>  +        dprintk(verbose, MANTIS_DEBUG, 1, "RC unregistered");
>  +        return 0;
>  +}
> 
> this might be dangerous when unloading the driver because the callback
> function might still be running after cancel_delayed_work.
> I ran into that problem a while ago and it could lock up the whole input system.
 > [...]

Thanks Markus! I created a revised version of the patch with call to 
flush_scheduled_work() after calling cancel_delayed_work. I also changed 
RC polling a bit so that it would work alike on different kernel 
configurations (thanks go to Kristian Slavov for pointing this out).

The patch is against 
http://www.jusst.de/hg/mantis/archive/b14e79e460fc.tar.bz2.

Regards,
Pauli Borodulin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mantis-rc-b14e79e460fc.patch
Url: http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080519/70b8b8c9/attachment.txt 


More information about the linux-dvb mailing list