From patchwork Sun Jan 10 14:43:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Regel X-Patchwork-Id: 72047 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0AEhua1028142 for ; Sun, 10 Jan 2010 14:43:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753681Ab0AJOnz (ORCPT ); Sun, 10 Jan 2010 09:43:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753699Ab0AJOny (ORCPT ); Sun, 10 Jan 2010 09:43:54 -0500 Received: from mail.gmx.net ([213.165.64.20]:60098 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753635Ab0AJOny (ORCPT ); Sun, 10 Jan 2010 09:43:54 -0500 Received: (qmail invoked by alias); 10 Jan 2010 14:43:51 -0000 Received: from i59F6A2DD.versanet.de (EHLO [192.168.0.20]) [89.246.162.221] by mail.gmx.net (mp006) with SMTP; 10 Jan 2010 15:43:51 +0100 X-Authenticated: #126152 X-Provags-ID: V01U2FsdGVkX1/u0GBT8pTuxK++xS8qW+UnX0SJC5ZxMzX3LbH6HK IHuBit6DzfKcEp Message-ID: <4B49E7A5.2020804@gmx.de> Date: Sun, 10 Jan 2010 15:43:49 +0100 From: Andreas Regel User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: Manu Abraham , Linux Media Mailing List Subject: Re: PULL http://jusst.de/hg/stv090x References: <1a297b361001091237n52999e51i3291c602856a3182@mail.gmail.com> <4B49CD9B.6040506@infradead.org> <4B49D0D6.2030101@gmx.de> <4B49E103.1000707@infradead.org> In-Reply-To: <4B49E103.1000707@infradead.org> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.48 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r b1e950fefc1a -r fefb0eb3c442 linux/drivers/media/dvb/frontends/stv090x.c --- a/linux/drivers/media/dvb/frontends/stv090x.c Wed Jan 06 02:24:56 2010 +0400 +++ b/linux/drivers/media/dvb/frontends/stv090x.c Sun Jan 10 05:32:22 2010 +0100 @@ -2514,12 +2514,12 @@ static u32 stv090x_srate_srch_coarse(str if (state->config->tuner_set_frequency) { if (state->config->tuner_set_frequency(fe, freq) < 0) - goto err; + goto err_gateoff; } if (state->config->tuner_set_bandwidth) { if (state->config->tuner_set_bandwidth(fe, state->tuner_bw) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -2532,7 +2532,7 @@ static u32 stv090x_srate_srch_coarse(str if (state->config->tuner_get_status) { if (state->config->tuner_get_status(fe, ®) < 0) - goto err; + goto err_gateoff; } if (reg) @@ -2551,6 +2551,9 @@ static u32 stv090x_srate_srch_coarse(str srate_coarse = stv090x_get_srate(state, state->internal->mclk); return srate_coarse; + +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1; @@ -2899,12 +2902,12 @@ static int stv090x_get_coldlock(struct s if (state->config->tuner_set_frequency) { if (state->config->tuner_set_frequency(fe, freq) < 0) - goto err; + goto err_gateoff; } if (state->config->tuner_set_bandwidth) { if (state->config->tuner_set_bandwidth(fe, state->tuner_bw) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -2917,7 +2920,7 @@ static int stv090x_get_coldlock(struct s if (state->config->tuner_get_status) { if (state->config->tuner_get_status(fe, ®) < 0) - goto err; + goto err_gateoff; } if (reg) @@ -2948,6 +2951,8 @@ static int stv090x_get_coldlock(struct s return lock; +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1; @@ -3321,7 +3326,7 @@ static enum stv090x_signal_state stv090x if (state->config->tuner_get_frequency) { if (state->config->tuner_get_frequency(fe, &state->frequency) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -3349,7 +3354,7 @@ static enum stv090x_signal_state stv090x if (state->config->tuner_get_frequency) { if (state->config->tuner_get_frequency(fe, &state->frequency) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -3369,6 +3374,9 @@ static enum stv090x_signal_state stv090x } return STV090x_OUTOFRANGE; + +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1; @@ -3735,7 +3743,7 @@ static int stv090x_optimize_track(struct if (state->config->tuner_set_bandwidth) { if (state->config->tuner_set_bandwidth(fe, state->tuner_bw) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -3787,6 +3795,9 @@ static int stv090x_optimize_track(struct stv090x_set_vit_thtracq(state); return 0; + +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1; @@ -4042,17 +4053,17 @@ static enum stv090x_signal_state stv090x if (state->config->tuner_set_bbgain) { if (state->config->tuner_set_bbgain(fe, 10) < 0) /* 10dB */ - goto err; + goto err_gateoff; } if (state->config->tuner_set_frequency) { if (state->config->tuner_set_frequency(fe, state->frequency) < 0) - goto err; + goto err_gateoff; } if (state->config->tuner_set_bandwidth) { if (state->config->tuner_set_bandwidth(fe, state->tuner_bw) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -4065,7 +4076,7 @@ static enum stv090x_signal_state stv090x if (state->config->tuner_get_status) { if (state->config->tuner_get_status(fe, ®) < 0) - goto err; + goto err_gateoff; } if (reg) @@ -4198,6 +4209,8 @@ static enum stv090x_signal_state stv090x } return signal_state; +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1; @@ -5138,12 +5151,12 @@ static int stv090x_init(struct dvb_front if (config->tuner_set_mode) { if (config->tuner_set_mode(fe, TUNER_WAKE) < 0) - goto err; + goto err_gateoff; } if (config->tuner_init) { if (config->tuner_init(fe) < 0) - goto err; + goto err_gateoff; } if (stv090x_i2c_gate_ctrl(fe, 0) < 0) @@ -5153,6 +5166,9 @@ static int stv090x_init(struct dvb_front goto err; return 0; + +err_gateoff: + stv090x_i2c_gate_ctrl(fe, 0); err: dprintk(FE_ERROR, 1, "I/O error"); return -1;