summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
authorAndrew de Quincy <devnull@localhost>2004-08-26 17:05:55 +0000
committerAndrew de Quincy <devnull@localhost>2004-08-26 17:05:55 +0000
commitcc370054d2e68e9f9fc0a3c670b7a28ce8d8f773 (patch)
tree08565c703d41f4cc7c6a4ae63da655241e05a33b /linux/drivers/media/dvb
parentdc2246a4fbb112b1eff22cf47302ea0616da839b (diff)
downloadmediapointer-dvb-s2-cc370054d2e68e9f9fc0a3c670b7a28ce8d8f773.tar.gz
mediapointer-dvb-s2-cc370054d2e68e9f9fc0a3c670b7a28ce8d8f773.tar.bz2
Fix SMP lockup issue
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index ae2891cfa..cade4979e 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -74,14 +74,15 @@ static u32 budget_debiread (struct budget_ci* budget_ci, u32 config, int addr, i
{
struct saa7146_dev *saa = budget_ci->budget.dev;
u32 result = 0;
+ unsigned long flags;
if (count > 4 || count <= 0)
return 0;
- spin_lock(&budget_ci->debilock);
-
+ spin_lock_irqsave(&budget_ci->debilock, flags);
+
if (saa7146_wait_for_debi_done(saa) < 0) {
- spin_unlock(&budget_ci->debilock);
+ spin_unlock_irqrestore(&budget_ci->debilock, flags);
return 0;
}
@@ -96,21 +97,22 @@ static u32 budget_debiread (struct budget_ci* budget_ci, u32 config, int addr, i
result = saa7146_read(saa, 0x88);
result &= (0xffffffffUL >> ((4 - count) * 8));
- spin_unlock(&budget_ci->debilock);
+ spin_unlock_irqrestore(&budget_ci->debilock, flags);
return result;
}
static u8 budget_debiwrite (struct budget_ci* budget_ci, u32 config, int addr, int count, u32 value)
{
struct saa7146_dev *saa = budget_ci->budget.dev;
+ unsigned long flags;
if (count > 4 || count <= 0)
return 0;
- spin_lock(&budget_ci->debilock);
-
+ spin_lock_irqsave(&budget_ci->debilock, flags);
+
if (saa7146_wait_for_debi_done(saa) < 0) {
- spin_unlock(&budget_ci->debilock);
+ spin_unlock_irqrestore(&budget_ci->debilock, flags);
return 0;
}
@@ -123,7 +125,7 @@ static u8 budget_debiwrite (struct budget_ci* budget_ci, u32 config, int addr, i
saa7146_wait_for_debi_done(saa);
- spin_unlock(&budget_ci->debilock);
+ spin_unlock_irqrestore(&budget_ci->debilock, flags);
return 0;
}