From patchwork Mon Mar 10 11:59:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 3802661 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 57FDEBF540 for ; Mon, 10 Mar 2014 12:00:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 73F792022A for ; Mon, 10 Mar 2014 12:00:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9319B201BA for ; Mon, 10 Mar 2014 12:00:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753473AbaCJMAe (ORCPT ); Mon, 10 Mar 2014 08:00:34 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50443 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753244AbaCJL7w (ORCPT ); Mon, 10 Mar 2014 07:59:52 -0400 Received: from [201.74.152.26] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1WMys1-000543-Ut; Mon, 10 Mar 2014 11:59:50 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1WMyrN-0001Qn-I9; Mon, 10 Mar 2014 08:59:09 -0300 From: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 10/15] drx-j: Don't use "state" for DVB lock state Date: Mon, 10 Mar 2014 08:59:02 -0300 Message-Id: <1394452747-5426-11-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394452747-5426-1-git-send-email-m.chehab@samsung.com> References: <1394452747-5426-1-git-send-email-m.chehab@samsung.com> To: unlisted-recipients:; (no To-header on input) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP State is already used on other places for the state struct. Don't use it here, to avoid troubles with latter patches. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/drx39xyj/drxj.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index a36cfa684153..7022a69f56bd 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -8861,7 +8861,7 @@ qam64auto(struct drx_demod_instance *demod, struct drx_sig_quality sig_quality; struct drxj_data *ext_attr = NULL; int rc; - u32 state = NO_LOCK; + u32 lck_state = NO_LOCK; u32 start_time = 0; u32 d_locked_time = 0; u32 timeout_ofs = 0; @@ -8871,7 +8871,7 @@ qam64auto(struct drx_demod_instance *demod, ext_attr = (struct drxj_data *) demod->my_ext_attr; *lock_status = DRX_NOT_LOCKED; start_time = jiffies_to_msecs(jiffies); - state = NO_LOCK; + lck_state = NO_LOCK; do { rc = ctrl_lock_status(demod, lock_status); if (rc != 0) { @@ -8879,7 +8879,7 @@ qam64auto(struct drx_demod_instance *demod, goto rw_error; } - switch (state) { + switch (lck_state) { case NO_LOCK: if (*lock_status == DRXJ_DEMOD_LOCK) { rc = ctrl_get_qam_sig_quality(demod, &sig_quality); @@ -8888,7 +8888,7 @@ qam64auto(struct drx_demod_instance *demod, goto rw_error; } if (sig_quality.MER > 208) { - state = DEMOD_LOCKED; + lck_state = DEMOD_LOCKED; /* some delay to see if fec_lock possible TODO find the right value */ timeout_ofs += DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME; /* see something, waiting longer */ d_locked_time = jiffies_to_msecs(jiffies); @@ -8909,7 +8909,7 @@ qam64auto(struct drx_demod_instance *demod, pr_err("error %d\n", rc); goto rw_error; } - state = SYNC_FLIPPED; + lck_state = SYNC_FLIPPED; msleep(10); } break; @@ -8934,7 +8934,7 @@ qam64auto(struct drx_demod_instance *demod, pr_err("error %d\n", rc); goto rw_error; } - state = SPEC_MIRRORED; + lck_state = SPEC_MIRRORED; /* reset timer TODO: still need 500ms? */ start_time = d_locked_time = jiffies_to_msecs(jiffies); @@ -9008,7 +9008,7 @@ qam256auto(struct drx_demod_instance *demod, struct drx_sig_quality sig_quality; struct drxj_data *ext_attr = NULL; int rc; - u32 state = NO_LOCK; + u32 lck_state = NO_LOCK; u32 start_time = 0; u32 d_locked_time = 0; u32 timeout_ofs = DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME; @@ -9017,14 +9017,14 @@ qam256auto(struct drx_demod_instance *demod, ext_attr = (struct drxj_data *) demod->my_ext_attr; *lock_status = DRX_NOT_LOCKED; start_time = jiffies_to_msecs(jiffies); - state = NO_LOCK; + lck_state = NO_LOCK; do { rc = ctrl_lock_status(demod, lock_status); if (rc != 0) { pr_err("error %d\n", rc); goto rw_error; } - switch (state) { + switch (lck_state) { case NO_LOCK: if (*lock_status == DRXJ_DEMOD_LOCK) { rc = ctrl_get_qam_sig_quality(demod, &sig_quality); @@ -9033,7 +9033,7 @@ qam256auto(struct drx_demod_instance *demod, goto rw_error; } if (sig_quality.MER > 268) { - state = DEMOD_LOCKED; + lck_state = DEMOD_LOCKED; timeout_ofs += DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME; /* see something, wait longer */ d_locked_time = jiffies_to_msecs(jiffies); } @@ -9050,7 +9050,7 @@ qam256auto(struct drx_demod_instance *demod, pr_err("error %d\n", rc); goto rw_error; } - state = SPEC_MIRRORED; + lck_state = SPEC_MIRRORED; /* reset timer TODO: still need 300ms? */ start_time = jiffies_to_msecs(jiffies); timeout_ofs = -DRXJ_QAM_MAX_WAITTIME / 2;