summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Waechtler <devnull@localhost>2003-03-22 11:43:15 +0000
committerHolger Waechtler <devnull@localhost>2003-03-22 11:43:15 +0000
commit63cb0c2e9b4d11a118ca8225f872f743302981e7 (patch)
tree2aca33f4f26a85b5209e87c83f857ee6e671de57
parent45a8287d7d7b76915cbdd65021a0988ab49561ec (diff)
downloadmediapointer-dvb-s2-63cb0c2e9b4d11a118ca8225f872f743302981e7.tar.gz
mediapointer-dvb-s2-63cb0c2e9b4d11a118ca8225f872f743302981e7.tar.bz2
more portability, now frontend modules build out of the box
-rw-r--r--linux/drivers/media/dvb/frontends/alps_bsrv2.c12
-rw-r--r--linux/drivers/media/dvb/frontends/alps_tdmb7.c14
-rw-r--r--linux/drivers/media/dvb/frontends/at76c651.c10
-rw-r--r--linux/drivers/media/dvb/frontends/grundig_29504-401.c6
-rw-r--r--linux/drivers/media/dvb/frontends/grundig_29504-491.c10
-rw-r--r--linux/drivers/media/dvb/frontends/nxt6000.c9
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c12
-rw-r--r--linux/drivers/media/dvb/frontends/ves1820.c9
8 files changed, 52 insertions, 30 deletions
diff --git a/linux/drivers/media/dvb/frontends/alps_bsrv2.c b/linux/drivers/media/dvb/frontends/alps_bsrv2.c
index b48be9345..e983647dc 100644
--- a/linux/drivers/media/dvb/frontends/alps_bsrv2.c
+++ b/linux/drivers/media/dvb/frontends/alps_bsrv2.c
@@ -20,8 +20,12 @@
*/
+#include <asm/errno.h>
+#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/string.h>
+#include <linux/slab.h>
#include "dvb_frontend.h"
@@ -211,7 +215,7 @@ int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
u32 BDRI;
u32 tmp;
- dprintk("%s: srate == %d\n", __FUNCTION__, srate);
+ dprintk("%s: srate == %ud\n", __FUNCTION__, (unsigned int) srate);
if (srate > 90100000UL/2)
srate = 90100000UL/2;
@@ -257,9 +261,9 @@ int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
BDRI = ( ((FIN << 8) / ((srate << (FNR >> 1)) >> 2)) + 1) >> 1;
dprintk("FNR= %d\n", FNR);
- dprintk("ratio= %08x\n", ratio);
- dprintk("BDR= %08x\n", BDR);
- dprintk("BDRI= %02x\n", BDRI);
+ dprintk("ratio= %08x\n", (unsigned int) ratio);
+ dprintk("BDR= %08x\n", (unsigned int) BDR);
+ dprintk("BDRI= %02x\n", (unsigned int) BDRI);
if (BDRI > 0xff)
BDRI = 0xff;
diff --git a/linux/drivers/media/dvb/frontends/alps_tdmb7.c b/linux/drivers/media/dvb/frontends/alps_tdmb7.c
index 7776e1137..9240e3fda 100644
--- a/linux/drivers/media/dvb/frontends/alps_tdmb7.c
+++ b/linux/drivers/media/dvb/frontends/alps_tdmb7.c
@@ -20,8 +20,12 @@
*/
+#include <asm/errno.h>
+#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
#include "dvb_frontend.h"
#include "compat.h"
@@ -147,7 +151,7 @@ int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
freq < 470000000 ? 0x42 : freq < 862000000 ? 0x41 : 0x81 };
#endif
- dprintk ("%s: freq == %i, div == %i\n", __FUNCTION__, freq, div);
+ dprintk ("%s: freq == %i, div == %i\n", __FUNCTION__, (int) freq, (int) div);
return pll_write (i2c, buf);
}
@@ -348,7 +352,7 @@ int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
}
case FE_READ_BER:
- *((uint32_t*) arg) = cx22700_readreg (i2c, 0x0c) & 0x7f;
+ *((u32*) arg) = cx22700_readreg (i2c, 0x0c) & 0x7f;
cx22700_writereg (i2c, 0x0c, 0x00);
break;
@@ -356,18 +360,18 @@ int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{
u16 rs_ber = (cx22700_readreg (i2c, 0x0d) << 9)
| (cx22700_readreg (i2c, 0x0e) << 1);
- *((uint16_t*) arg) = ~rs_ber;
+ *((u16*) arg) = ~rs_ber;
break;
}
case FE_READ_SNR:
{
u16 rs_ber = (cx22700_readreg (i2c, 0x0d) << 9)
| (cx22700_readreg (i2c, 0x0e) << 1);
- *((uint16_t*) arg) = ~rs_ber;
+ *((u16*) arg) = ~rs_ber;
break;
}
case FE_READ_UNCORRECTED_BLOCKS:
- *((uint32_t*) arg) = cx22700_readreg (i2c, 0x0f);
+ *((u32*) arg) = cx22700_readreg (i2c, 0x0f);
cx22700_writereg (i2c, 0x0f, 0x00);
break;
diff --git a/linux/drivers/media/dvb/frontends/at76c651.c b/linux/drivers/media/dvb/frontends/at76c651.c
index 5fa065962..288d59d02 100644
--- a/linux/drivers/media/dvb/frontends/at76c651.c
+++ b/linux/drivers/media/dvb/frontends/at76c651.c
@@ -22,11 +22,12 @@
*
*/
-#include <linux/module.h>
+#include <asm/errno.h>
#include <linux/init.h>
-#include <linux/delay.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
#include <linux/slab.h>
-#include <linux/i2c.h>
#if defined(__powerpc__)
#include <asm/bitops.h>
@@ -34,6 +35,7 @@
#include "dvb_frontend.h"
#include "dvb_i2c.h"
+#include "compat.h"
static int debug = 0;
@@ -103,7 +105,7 @@ at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data)
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
__FUNCTION__, reg, data, ret);
- mdelay(10);
+ ddelay(10);
return (ret != 1) ? -EREMOTEIO : 0;
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-401.c b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
index 6e8b3ccea..eef107bc9 100644
--- a/linux/drivers/media/dvb/frontends/grundig_29504-401.c
+++ b/linux/drivers/media/dvb/frontends/grundig_29504-401.c
@@ -22,8 +22,12 @@
*/
-#include <linux/module.h>
+#include <asm/errno.h>
#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
#include "dvb_frontend.h"
diff --git a/linux/drivers/media/dvb/frontends/grundig_29504-491.c b/linux/drivers/media/dvb/frontends/grundig_29504-491.c
index 0eff691c7..04f87d4ab 100644
--- a/linux/drivers/media/dvb/frontends/grundig_29504-491.c
+++ b/linux/drivers/media/dvb/frontends/grundig_29504-491.c
@@ -24,9 +24,14 @@
*/
+#include <asm/errno.h>
#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include "compat.h"
#include "dvb_frontend.h"
static int debug = 0;
@@ -222,7 +227,7 @@ int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
tmp = (tmp % srate) << 8;
ratio = (ratio << 8) + tmp / srate;
- dprintk("tda8083: ratio == %08x\n", ratio);
+ dprintk("tda8083: ratio == %08x\n", (unsigned int) ratio);
tda8083_writereg (i2c, 0x05, filter);
tda8083_writereg (i2c, 0x02, (ratio >> 16) & 0xff);
@@ -244,8 +249,7 @@ void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
while (jiffies - start < timeout &&
!(tda8083_readreg(i2c, 0x02) & 0x80))
{
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout (5);
+ ddelay(50);
};
}
diff --git a/linux/drivers/media/dvb/frontends/nxt6000.c b/linux/drivers/media/dvb/frontends/nxt6000.c
index 8e31721de..d377c224f 100644
--- a/linux/drivers/media/dvb/frontends/nxt6000.c
+++ b/linux/drivers/media/dvb/frontends/nxt6000.c
@@ -25,13 +25,12 @@
*/
-#include <linux/module.h>
+#include <asm/errno.h>
#include <linux/init.h>
-#include <linux/delay.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/string.h>
#include <linux/slab.h>
-#include <linux/poll.h>
-#include <asm/io.h>
-#include <linux/i2c.h>
#include "dvb_frontend.h"
#include "nxt6000.h"
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index 0f508a728..d84da3ee1 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -35,9 +35,13 @@
*/
+#include <asm/errno.h>
#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/string.h>
+#include "compat.h"
#include "dvb_frontend.h"
static int debug = 0;
@@ -435,8 +439,7 @@ int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
dprintk ("%s: timeout!!\n", __FUNCTION__);
return -ETIMEDOUT;
}
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout (1);
+ ddelay(10);
};
return 0;
@@ -455,8 +458,7 @@ int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
dprintk ("%s: timeout!!\n", __FUNCTION__);
return -ETIMEDOUT;
}
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout (1);
+ ddelay(10);
};
return 0;
@@ -692,7 +694,7 @@ int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
dprintk ("AGC2I: 0x%02x%02x, signal=0x%04x\n",
stv0299_readreg (i2c, 0x18),
- stv0299_readreg (i2c, 0x19), signal);
+ stv0299_readreg (i2c, 0x19), (int) signal);
signal = signal * 5 / 4;
*((u16*) arg) = (signal > 0xffff) ? 0xffff :
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c
index 10e9d59b5..e44da992b 100644
--- a/linux/drivers/media/dvb/frontends/ves1820.c
+++ b/linux/drivers/media/dvb/frontends/ves1820.c
@@ -19,9 +19,12 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <asm/errno.h>
#include <linux/init.h>
+#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/delay.h>
+#include <linux/string.h>
+#include <linux/slab.h>
#include "dvb_frontend.h"
#include "compat.h"
@@ -117,7 +120,7 @@ int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data)
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
__FUNCTION__, reg, data, ret);
- mdelay(10);
+ ddelay(10);
return (ret != 1) ? -EREMOTEIO : 0;
}
@@ -203,7 +206,7 @@ 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(1);
+ ddelay(10);
if (!(ves1820_readreg (fe, 0x11) & 0x08)) {
reg0 ^= 0x20;
ves1820_writereg (fe, 0x00, reg0 & 0xfe);