diff options
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-gpio.c')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-gpio.c b/linux/drivers/media/video/ivtv/ivtv-gpio.c index 14f57285d..688cd3856 100644 --- a/linux/drivers/media/video/ivtv/ivtv-gpio.c +++ b/linux/drivers/media/video/ivtv/ivtv-gpio.c @@ -22,6 +22,7 @@ #include "ivtv-driver.h" #include "ivtv-cards.h" #include "ivtv-gpio.h" +#include "tuner-xc2028.h" #include <media/tuner.h> /* @@ -122,13 +123,15 @@ void ivtv_reset_ir_gpio(struct ivtv *itv) write_reg(curdir, IVTV_REG_GPIO_DIR); } -#ifdef HAVE_XC2028 /* Xceive tuner reset function */ int ivtv_reset_tuner_gpio(void *dev, int cmd, int value) { - struct ivtv *itv = (struct ivtv *)dev; + struct i2c_algo_bit_data *algo = dev; + struct ivtv *itv = algo->data; int curdir, curout; + if (cmd != XC2028_TUNER_RESET) + return 0; IVTV_DEBUG_INFO("Resetting tuner\n"); curout = read_reg(IVTV_REG_GPIO_OUT); curdir = read_reg(IVTV_REG_GPIO_DIR); @@ -143,7 +146,6 @@ int ivtv_reset_tuner_gpio(void *dev, int cmd, int value) schedule_timeout_interruptible(msecs_to_jiffies(1)); return 0; } -#endif void ivtv_gpio_init(struct ivtv *itv) { |