summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorMichael Hunold <devnull@localhost>2003-04-25 08:21:35 +0000
committerMichael Hunold <devnull@localhost>2003-04-25 08:21:35 +0000
commitcb61a9ffb7f22d9d73d7263bf84142941b336050 (patch)
tree15cf8cb24554e4a1af38ecf999892bf84e78cd0f /linux/drivers/media/dvb/frontends
parentf7e91da79a7d08e9aa8d555b7a6e96ca6548b93e (diff)
downloadmediapointer-dvb-s2-cb61a9ffb7f22d9d73d7263bf84142941b336050.tar.gz
mediapointer-dvb-s2-cb61a9ffb7f22d9d73d7263bf84142941b336050.tar.bz2
Lots of cosmetic changes in order to sync the CVS with
the version that made it into the 2.5.68 kernel. - remove unnecessary c++-style comments - fixed some line breaks and the style function headers are formatted: please don't argue with me about these changes, I don't care how they are formatted. - remove newline breaks between memory allocation and the return value check Some more interesing stuff: - remove ddelay() functions completly, replace with set_current_state() and manual schedule_timeout() calls. - made some init data for the mxb driver static and global (patch already send to lkml) Some crucial changes: - inherit some return values Mr. Alan Cox has changed -- please review
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r--linux/drivers/media/dvb/frontends/alps_tdmb7.c3
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c3
-rw-r--r--linux/drivers/media/dvb/frontends/cx24110.c4
-rw-r--r--linux/drivers/media/dvb/frontends/grundig_29504-491.c3
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c6
-rw-r--r--linux/drivers/media/dvb/frontends/ves1820.c7
6 files changed, 18 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/frontends/alps_tdmb7.c b/linux/drivers/media/dvb/frontends/alps_tdmb7.c
index df95c64a6..54ac21eac 100644
--- a/linux/drivers/media/dvb/frontends/alps_tdmb7.c
+++ b/linux/drivers/media/dvb/frontends/alps_tdmb7.c
@@ -167,7 +167,8 @@ int cx22700_init (struct dvb_i2c_bus *i2c)
cx22700_writereg (i2c, 0x00, 0x02); /* soft reset */
cx22700_writereg (i2c, 0x00, 0x00);
- ddelay (HZ/100);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
for (i=0; i<sizeof(init_tab); i+=2)
cx22700_writereg (i2c, init_tab[i], init_tab[i+1]);
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index 56ad686f4..b8666c901 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -105,7 +105,8 @@ at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data)
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
__FUNCTION__, reg, data, ret);
- ddelay(10);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
return (ret != 1) ? -EREMOTEIO : 0;
diff --git a/linux/drivers/media/dvb/frontends/cx24110.c b/linux/drivers/media/dvb/frontends/cx24110.c
index 534371c54..5299a3783 100644
--- a/linux/drivers/media/dvb/frontends/cx24110.c
+++ b/linux/drivers/media/dvb/frontends/cx24110.c
@@ -245,7 +245,9 @@ int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
cx24108_write(i2c,pll);
cx24110_writereg(i2c,0x56,0x7f);
- ddelay(HZ/10); /* wait a moment for the tuner pll to lock */
+ /* wait a moment for the tuner pll to lock */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (10);
/* tuner pll lock can be monitored on GPIO pin 4 of cx24110 */
while(!(cx24110_readreg(i2c,0x66)&0x20)&&i<1000) i++;
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-491.c b/linux/drivers/media/dvb/frontends/grundig_29504-491.c
index 5db49c1e7..386c9a590 100644
--- a/linux/drivers/media/dvb/frontends/grundig_29504-491.c
+++ b/linux/drivers/media/dvb/frontends/grundig_29504-491.c
@@ -249,7 +249,8 @@ void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
while (jiffies - start < timeout &&
!(tda8083_readreg(i2c, 0x02) & 0x80))
{
- ddelay(50);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (5);
};
}
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index f9a9f3c2a..a88a8b792 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -439,7 +439,8 @@ int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
dprintk ("%s: timeout!!\n", __FUNCTION__);
return -ETIMEDOUT;
}
- ddelay(10);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
};
return 0;
@@ -458,7 +459,8 @@ int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
dprintk ("%s: timeout!!\n", __FUNCTION__);
return -ETIMEDOUT;
}
- ddelay(10);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
};
return 0;
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c
index be3a54f14..bb61fe54c 100644
--- a/linux/drivers/media/dvb/frontends/ves1820.c
+++ b/linux/drivers/media/dvb/frontends/ves1820.c
@@ -123,7 +123,9 @@ int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data)
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
__FUNCTION__, reg, data, ret);
- ddelay(10);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
+
return (ret != 1) ? -EREMOTEIO : 0;
}
@@ -209,7 +211,8 @@ int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0)
* check lock and toggle inversion bit if required...
*/
if (!(ves1820_readreg (fe, 0x11) & 0x08)) {
- ddelay(10);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout (1);
if (!(ves1820_readreg (fe, 0x11) & 0x08)) {
reg0 ^= 0x20;
ves1820_writereg (fe, 0x00, reg0 & 0xfe);