From: Hans Verkuil Date: Fri, 30 May 2008 14:03:12 +0000 (-0300) Subject: V4L/DVB (7978): cx18: explicitly test for XC2028 tuner X-Git-Tag: v2.6.26-rc6~96^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ecc24737700f07d6c2a8fdf8c1737e399f1830f;p=linux-2.6 V4L/DVB (7978): cx18: explicitly test for XC2028 tuner Testing whether xceive_pin is non-zero is not good enough as 0 is a valid value. Instead explicitly test whether the Xceive tuner is used. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx18/cx18-gpio.c b/drivers/media/video/cx18/cx18-gpio.c index 2f324b8467..ceb63653c9 100644 --- a/drivers/media/video/cx18/cx18-gpio.c +++ b/drivers/media/video/cx18/cx18-gpio.c @@ -62,7 +62,7 @@ void cx18_gpio_init(struct cx18 *cx) cx->gpio_dir = cx->card->gpio_init.direction; cx->gpio_val = cx->card->gpio_init.initial_value; - if (cx->card->xceive_pin) { + if (cx->card->tuners[0].tuner == TUNER_XC2028) { cx->gpio_dir |= 1 << cx->card->xceive_pin; cx->gpio_val |= 1 << cx->card->xceive_pin; }