projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8de111e
)
[media] fintek-cir: make suspend with active IR more reliable
author
Jarod Wilson
<
[email protected]
>
Fri, 27 May 2011 20:14:51 +0000
(17:14 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Sat, 11 Jun 2011 12:03:35 +0000
(09:03 -0300)
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 <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/rc/fintek-cir.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/fintek-cir.c
b/drivers/media/rc/fintek-cir.c
index 8fa539dde1b4be8547ecee3247add51bb2957a19..7f7079b12f2321ab2174a764dca2959e0c0a6952 100644
(file)
--- 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 */