• Heiner Kallweit's avatar
    [media] media: rc: nuvoton-cir: fix interrupt handling · d42fd297
    Heiner Kallweit authored
    Only handle an interrupt if at least one combination of event bit
    and related interrupt bit is set.
    Previously it was just checked that at least one event bit and
    at least one interrupt bit are set.
    
    This fixes issues like the following which was caused by
    interrupt sharing:
    An interrupt intended for nvt_cir_isr was handled by nvt_cir_wake_isr
    first and because status bit CIR_WAKE_IRSTS_IR_PENDING was set
    the wake fifo was accidently cleared.
    
    This patch also fixes the bug that nvt_cir_wake_isr returned IRQ_HANDLED
    even if it detected that the (shared) interrupt was meant for another
    handler.
    Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    d42fd297
nuvoton-cir.c 33.8 KB