summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2005-02-09 19:27:21 +0000
committerGerd Knorr <devnull@localhost>2005-02-09 19:27:21 +0000
commita57f1dd6d13a9b061984fe1621703da7ae99090d (patch)
tree2599ac5eb9411b6573213c22407fcf583ac4f769 /linux/drivers/media/video/tuner-core.c
parentd88c7c9e5a9181439bd0facde6802a881acd5442 (diff)
downloadmediapointer-dvb-s2-a57f1dd6d13a9b061984fe1621703da7ae99090d.tar.gz
mediapointer-dvb-s2-a57f1dd6d13a9b061984fe1621703da7ae99090d.tar.bz2
- make the new splitted tuner module build.
Diffstat (limited to 'linux/drivers/media/video/tuner-core.c')
-rw-r--r--linux/drivers/media/video/tuner-core.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index f20e7b912..0fdc2fcf6 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,8 @@
/*
- * $Id: tuner-core.c,v 1.1 2005/02/09 15:42:46 kraxel Exp $
+ * $Id: tuner-core.c,v 1.2 2005/02/09 19:27:21 kraxel Exp $
+ *
+ * i2c tv tuner chip device driver
+ * core core, i.e. kernel interfaces, registering and so on
*/
#include <linux/module.h>
@@ -242,9 +245,6 @@ static int tuner_detach(struct i2c_client *client)
i2c_detach_client(client);
kfree(t);
kfree(client);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- MOD_DEC_USE_COUNT;
-#endif
return 0;
}
@@ -323,10 +323,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct video_tuner *vt = arg;
CHECK_V4L2;
-#if 0
- if (V4L2_TUNER_RADIO == t->mode)
- vt->signal = tuner_signal(client);
-#endif
+ if (V4L2_TUNER_RADIO == t->mode && t->has_signal)
+ vt->signal = t->has_signal(client);
return 0;
}
case VIDIOCGAUDIO:
@@ -334,10 +332,10 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct video_audio *va = arg;
CHECK_V4L2;
-#if 0
- if (V4L2_TUNER_RADIO == t->mode)
- va->mode = (tuner_stereo(client) ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO);
-#endif
+ if (V4L2_TUNER_RADIO == t->mode && t->is_stereo)
+ va->mode = t->is_stereo(client)
+ ? VIDEO_SOUND_STEREO
+ : VIDEO_SOUND_MONO;
return 0;
}
@@ -371,10 +369,8 @@ tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
struct v4l2_tuner *tuner = arg;
SWITCH_V4L2;
-#if 0
- if (V4L2_TUNER_RADIO == t->mode)
- tuner->signal = tuner_signal(client);
-#endif
+ if (V4L2_TUNER_RADIO == t->mode && t->has_signal)
+ tuner->signal = t->has_signal(client);
break;
}
default:
@@ -406,9 +402,7 @@ static int tuner_resume(struct device * dev, u32 level)
/* ----------------------------------------------------------------------- */
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
.owner = THIS_MODULE,
-#endif
.name = "i2c TV tuner driver",
.id = I2C_DRIVERID_TUNER,
.flags = I2C_DF_NOTIFY,