diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-gpio.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-gpio.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/ivtv/ivtv-gpio.c b/drivers/media/video/ivtv/ivtv-gpio.c index 688cd3856685..d8ac09f3cce6 100644 --- a/drivers/media/video/ivtv/ivtv-gpio.c +++ b/drivers/media/video/ivtv/ivtv-gpio.c | |||
@@ -128,20 +128,17 @@ int ivtv_reset_tuner_gpio(void *dev, int cmd, int value) | |||
128 | { | 128 | { |
129 | struct i2c_algo_bit_data *algo = dev; | 129 | struct i2c_algo_bit_data *algo = dev; |
130 | struct ivtv *itv = algo->data; | 130 | struct ivtv *itv = algo->data; |
131 | int curdir, curout; | 131 | u32 curout; |
132 | 132 | ||
133 | if (cmd != XC2028_TUNER_RESET) | 133 | if (cmd != XC2028_TUNER_RESET) |
134 | return 0; | 134 | return 0; |
135 | IVTV_DEBUG_INFO("Resetting tuner\n"); | 135 | IVTV_DEBUG_INFO("Resetting tuner\n"); |
136 | curout = read_reg(IVTV_REG_GPIO_OUT); | 136 | curout = read_reg(IVTV_REG_GPIO_OUT); |
137 | curdir = read_reg(IVTV_REG_GPIO_DIR); | 137 | curout &= ~(1 << itv->card->xceive_pin); |
138 | curdir |= (1 << 12); /* GPIO bit 12 */ | ||
139 | |||
140 | curout &= ~(1 << 12); | ||
141 | write_reg(curout, IVTV_REG_GPIO_OUT); | 138 | write_reg(curout, IVTV_REG_GPIO_OUT); |
142 | schedule_timeout_interruptible(msecs_to_jiffies(1)); | 139 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
143 | 140 | ||
144 | curout |= (1 << 12); | 141 | curout |= 1 << itv->card->xceive_pin; |
145 | write_reg(curout, IVTV_REG_GPIO_OUT); | 142 | write_reg(curout, IVTV_REG_GPIO_OUT); |
146 | schedule_timeout_interruptible(msecs_to_jiffies(1)); | 143 | schedule_timeout_interruptible(msecs_to_jiffies(1)); |
147 | return 0; | 144 | return 0; |