From: Hans Verkuil Date: Thu, 29 Jun 2006 19:30:51 +0000 (-0300) Subject: V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887. X-Git-Tag: v2.6.18-rc1~256^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=00e158d52a8107ebcb0eaee6442267927f149b3b;p=linux-2.6 V4L/DVB (4281): TDA9887_SET_CONFIG should only be handled by the tda9887. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 7f7d5e355b..f7eb402d5f 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c @@ -608,13 +608,13 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) tuner_dbg("VIDIOCSAUDIO not implemented.\n"); break; case TDA9887_SET_CONFIG: - { - int *i = arg; + if (t->type == TUNER_TDA9887) { + int *i = arg; - t->tda9887_config = *i; - set_freq(client, t->tv_freq); + t->tda9887_config = *i; + set_freq(client, t->tv_freq); + } break; - } /* --- v4l ioctls --- */ /* take care: bttv does userspace copying, we'll get a kernel pointer here... */