summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2004-02-20 12:53:10 +0000
committerJohannes Stezenbach <devnull@localhost>2004-02-20 12:53:10 +0000
commit3550d7d56a79a922dc4c1c5c74cf41929c8ceb88 (patch)
tree3be2e36832e64040244127662deeff90546e8591
parentc153a8456f01a996e3d1cbc5d467e9bd4d9b6437 (diff)
downloadmediapointer-dvb-s2-3550d7d56a79a922dc4c1c5c74cf41929c8ceb88.tar.gz
mediapointer-dvb-s2-3550d7d56a79a922dc4c1c5c74cf41929c8ceb88.tar.bz2
fix timeout bug on AMD64 in saa7146_wait_for_debi_done()
-rw-r--r--linux/drivers/media/common/saa7146_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 5e141af7c..5e028d1bd 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -69,14 +69,14 @@ void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
/* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
{
- int start;
+ unsigned long start;
/* wait for registers to be programmed */
start = jiffies;
while (1) {
if (saa7146_read(dev, MC2) & 2)
break;
- if (jiffies-start > HZ/20) {
+ if (time_after(jiffies, start + HZ/20)) {
DEB_S(("timed out while waiting for registers getting programmed\n"));
return -ETIMEDOUT;
}
@@ -88,7 +88,7 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
break;
saa7146_read(dev, MC2);
- if (jiffies-start > HZ/4) {
+ if (time_after(jiffies, start + HZ/4)) {
DEB_S(("timed out while waiting for transfer completion\n"));
return -ETIMEDOUT;
}