summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/msp3400-driver.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-08 07:25:08 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-08 07:25:08 -0300
commitc13f70467621e2c352f93b336b382e70ea24d218 (patch)
tree582367340fe7529eb3fec3c514ec9d4b2f68ff71 /linux/drivers/media/video/msp3400-driver.c
parenta953cf4edb8db13f8b7d20c793696a13ffcd3333 (diff)
parent9380e197397e3f8404fa2d2effe5c84b6f56735b (diff)
downloadmediapointer-dvb-s2-c13f70467621e2c352f93b336b382e70ea24d218.tar.gz
mediapointer-dvb-s2-c13f70467621e2c352f93b336b382e70ea24d218.tar.bz2
merge: http://linuxtv.org/hg/~jfrancois/gspca/
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/msp3400-driver.c')
-rw-r--r--linux/drivers/media/video/msp3400-driver.c67
1 files changed, 1 insertions, 66 deletions
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index 5ea4fd801..cd92f1f68 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -57,17 +57,12 @@
#include <media/v4l2-i2c-drv-legacy.h>
#include <media/tvaudio.h>
#include <media/msp3400.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
#include <linux/kthread.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
#include <linux/suspend.h>
#else
#include <linux/freezer.h>
#endif
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-#include "i2c-compat.h"
-#endif
#include "compat.h"
#include "msp3400-driver.h"
@@ -90,7 +85,6 @@ int msp_dolby;
int msp_stereo_thresh = 0x190; /* a2 threshold for stereo/bilingual
(msp34xxg only) 0x00a0-0x03c0 */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
/* read-only */
module_param(opmode, int, 0444);
@@ -101,15 +95,6 @@ module_param_named(stereo_threshold, msp_stereo_thresh, int, 0644);
module_param_named(standard, msp_standard, int, 0644);
module_param_named(amsound, msp_amsound, bool, 0644);
module_param_named(dolby, msp_dolby, bool, 0644);
-#else
-MODULE_PARM(opmode, "i");
-MODULE_PARM(msp_once, "i");
-MODULE_PARM(msp_debug, "i");
-MODULE_PARM(msp_stereo_thresh, "i");
-MODULE_PARM(msp_standard, "i");
-MODULE_PARM(msp_amsound, "i");
-MODULE_PARM(msp_dolby, "i");
-#endif
MODULE_PARM_DESC(opmode, "Forces a MSP3400 opmode. 0=Manual, 1=Autodetect, 2=Autodetect and autoselect");
MODULE_PARM_DESC(once, "No continuous stereo monitoring");
@@ -130,9 +115,7 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing");
/* Addresses to scan */
static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-#endif
+
I2C_CLIENT_INSMOD;
/* ----------------------------------------------------------------------- */
@@ -356,24 +339,6 @@ void msp_set_audio(struct i2c_client *client)
/* ------------------------------------------------------------------------ */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-static void msp_setup_thread(struct msp_state *state)
-{
- daemonize();
- exit_files(current);
- reparent_to_init();
-
- spin_lock_irq(SIGMASK_LOCK(current));
- sigfillset(&current->blocked);
- spin_unlock_irq(SIGMASK_LOCK(current));
- strcpy(current->comm, "msp3400");
-
- state->kthread = current;
- if (state->notify != NULL)
- up(state->notify);
-}
-#endif
-
static void msp_wake_thread(struct i2c_client *client)
{
struct msp_state *state = i2c_get_clientdata(client);
@@ -390,11 +355,7 @@ int msp_sleep(struct msp_state *state, int timeout)
DECLARE_WAITQUEUE(wait, current);
add_wait_queue(&state->wq, &wait);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
- if (!(state->rmmod || signal_pending(current))) {
-#else
if (!kthread_should_stop()) {
-#endif
if (timeout < 0) {
set_current_state(TASK_INTERRUPTIBLE);
schedule();
@@ -1018,20 +979,10 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)
/* startup control thread if needed */
if (thread_func) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
state->kthread = kthread_run(thread_func, client, "msp34xx");
if (IS_ERR(state->kthread))
v4l_warn(client, "kernel_thread() failed\n");
-#else
- DECLARE_MUTEX_LOCKED(sem);
-
- state->kthread = NULL;
- state->notify = &sem;
- kernel_thread(thread_func, client, 0);
- down(&sem);
- state->notify = NULL;
-#endif
msp_wake_thread(client);
}
return 0;
@@ -1043,20 +994,8 @@ static int msp_remove(struct i2c_client *client)
/* shutdown control thread */
if (state->kthread) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
- DECLARE_MUTEX_LOCKED(sem);
-#endif
state->restart = 1;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
- /* shutdown control thread */
- state->notify = &sem;
- state->rmmod = 1;
- wake_up_interruptible(&state->wq);
- down(&sem);
- state->notify = NULL;
-#else
kthread_stop(state->kthread);
-#endif
}
msp_reset(client);
@@ -1087,10 +1026,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
#endif
};
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
-EXPORT_NO_SYMBOLS;
-#endif
-
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------