From a57f1dd6d13a9b061984fe1621703da7ae99090d Mon Sep 17 00:00:00 2001 From: Gerd Knorr Date: Wed, 9 Feb 2005 19:27:21 +0000 Subject: - make the new splitted tuner module build. --- linux/drivers/media/video/tuner-core.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'linux/drivers/media/video/tuner-core.c') 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 @@ -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, -- cgit v1.2.3