summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c37
1 files changed, 7 insertions, 30 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 39ef32abe..a5ce92cc4 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -75,6 +75,8 @@
#include "dvb_i2c.h"
#include "dvb_frontend.h"
+#include "compat.h"
+
#if 1
#define DEBUG_VARIABLE av7110_debug
@@ -107,20 +109,6 @@ static int hw_sections = 1;
int av7110_num = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
- #define KBUILD_MODNAME av7110
-#endif
-
-/****************************************************************************
- * General helper functions
- ****************************************************************************/
-
-static inline void ddelay(int i)
-{
- current->state=TASK_INTERRUPTIBLE;
- schedule_timeout((HZ*i)/100);
-}
-
/****************************************************************************
* DEBI functions
@@ -326,7 +314,8 @@ recover_arm(av7110_t *av7110)
printk("OOPS, no current->files\n");
reset_arm(av7110);
}
- ddelay(10);
+
+ ddelay(100);
restart_feeds(av7110);
}
@@ -346,21 +335,9 @@ static int arm_thread(void *data)
u16 newloops = 0;
DEB_EE(("av7110: %p\n",av7110));
-
- lock_kernel();
-#if 0
- daemonize();
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51)
- reparent_to_init ();
-#endif
-#else
- exit_mm(current);
- current->session=current->pgrp=1;
-#endif
- sigfillset(&current->blocked);
- strcpy(current->comm, "arm_mon");
+
+ kernel_thread_setup ("arm_mon");
av7110->arm_thread = current;
- unlock_kernel();
while (!av7110->arm_rmmod && !signal_pending(current)) {
interruptible_sleep_on_timeout(&av7110->arm_wait, 5*HZ);
@@ -4143,7 +4120,7 @@ int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *p
i2c_writereg(av7110, 0x80, 0x0, 0);
printk ("av7110: DVB-C analog module detected, "
"initializing MSP3400\n");
- ddelay(10);
+ ddelay(100);
msp_writereg(av7110, 0x12, 0x0013, 0x0c00);
msp_writereg(av7110, 0x12, 0x0000, 0x7f00); // loudspeaker + headphone
msp_writereg(av7110, 0x12, 0x0008, 0x0220); // loudspeaker source