diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-05-27 17:14:51 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-06-11 09:03:35 -0300 |
commit | 0ae90252d0b28265bc16cf272e72d62281f7baf1 (patch) | |
tree | ee2490b1c6299365a53782700cbd8b441f067a02 /drivers/media/rc | |
parent | 8de111e27688798623b9e9062235bb0cac29f599 (diff) | |
download | op-kernel-dev-0ae90252d0b28265bc16cf272e72d62281f7baf1.zip op-kernel-dev-0ae90252d0b28265bc16cf272e72d62281f7baf1.tar.gz |
[media] fintek-cir: make suspend with active IR more reliable
There was a missing lock in fintek_suspend. Without the lock, its
possible the system will be in the middle of receiving IR (draining the
RX buffer) when we try to disable CIR interrupts.
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/fintek-cir.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 8fa539d..7f7079b 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -597,12 +597,17 @@ static void __devexit fintek_remove(struct pnp_dev *pdev) static int fintek_suspend(struct pnp_dev *pdev, pm_message_t state) { struct fintek_dev *fintek = pnp_get_drvdata(pdev); + unsigned long flags; fit_dbg("%s called", __func__); + spin_lock_irqsave(&fintek->fintek_lock, flags); + /* disable all CIR interrupts */ fintek_cir_reg_write(fintek, CIR_STATUS_IRQ_MASK, CIR_STATUS); + spin_unlock_irqrestore(&fintek->fintek_lock, flags); + fintek_config_mode_enable(fintek); /* disable cir logical dev */ |