From patchwork Wed Jan 20 02:20:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roel Kluin X-Patchwork-Id: 73996 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 o0K2GOKC023654 for ; Wed, 20 Jan 2010 02:16:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756326Ab0ATCPl (ORCPT ); Tue, 19 Jan 2010 21:15:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756310Ab0ATCPk (ORCPT ); Tue, 19 Jan 2010 21:15:40 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:37497 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756296Ab0ATCPj (ORCPT ); Tue, 19 Jan 2010 21:15:39 -0500 Received: by ewy19 with SMTP id 19so542898ewy.21 for ; Tue, 19 Jan 2010 18:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=mvMNaW4X5TpuKuvJS/WUYF2dB+E+MTxUAHrBNcyzOw4=; b=OX2vKvGkVN6YAX3edI28emrSzalRctDaJ2koolP/qPiWN4vWs56GFA4JYmKQqXpELK V9tlLSPYLUmOPfH8rZcCmpwNz3K+Y7rATPP/xroP5gZV9tkqQUqs1ha0S5y0SewaaOBH xRm9wS4OSgrwb4kbzriuBPpjXgOG8hyfLYYyw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=xJqA1iRZ6YtB7LTTtFn6get1AVESXHeVaZfr7UWPXSONlBGH6uXKZrUShfsw+fwFwf 6lv72yhpIQhZUcHnnDU/BKk2Crwc/+LGUfj9NMHnfL035ZRxbUitOPR2Z5Z7ARG3fa9z TtSpDQ3xDnFHmSadCcu0t76PUKMPdybpIqIqU= Received: by 10.213.57.136 with SMTP id c8mr3202109ebh.13.1263953716262; Tue, 19 Jan 2010 18:15:16 -0800 (PST) Received: from zoinx.mars (d133062.upc-d.chello.nl [213.46.133.62]) by mx.google.com with ESMTPS id 28sm9295464eyg.28.2010.01.19.18.15.15 (version=SSLv3 cipher=RC4-MD5); Tue, 19 Jan 2010 18:15:15 -0800 (PST) Message-ID: <4B56685E.9060909@gmail.com> Date: Wed, 20 Jan 2010 03:20:14 +0100 From: Roel Kluin User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0 MIME-Version: 1.0 To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, Andrew Morton , LKML Subject: [PATCH] mxl5005s: bad checks of state->Mode Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c index 605e28b..3967412 100644 --- a/drivers/media/common/tuners/mxl5005s.c +++ b/drivers/media/common/tuners/mxl5005s.c @@ -1815,9 +1815,8 @@ static u16 MXL_BlockInit(struct dvb_frontend *fe) /* Charge Pump Control Dig Ana */ status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, state->Mode ? 5 : 8); - status += MXL_ControlWrite(fe, - RFSYN_EN_CHP_HIGAIN, state->Mode ? 1 : 1); - status += MXL_ControlWrite(fe, EN_CHP_LIN_B, state->Mode ? 0 : 0); + status += MXL_ControlWrite(fe, RFSYN_EN_CHP_HIGAIN, 1); + status += MXL_ControlWrite(fe, EN_CHP_LIN_B, 0); /* AGC TOP Control */ if (state->AGC_Mode == 0) /* Dual AGC */ { @@ -2161,7 +2160,7 @@ static u16 MXL_IFSynthInit(struct dvb_frontend *fe) } } - if (state->Mode || (state->Mode == 0 && state->IF_Mode == 0)) { + if (state->Mode || state->IF_Mode == 0) { if (state->IF_LO == 57000000UL) { status += MXL_ControlWrite(fe, IF_DIVVAL, 0x10); status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08);