From patchwork Wed May 21 18:19:59 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: 4218341 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 740BBBEEAB for ; Wed, 21 May 2014 18:20:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AB41201FE for ; Wed, 21 May 2014 18:20:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C5B7B2011E for ; Wed, 21 May 2014 18:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752995AbaEUSU3 (ORCPT ); Wed, 21 May 2014 14:20:29 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:35963 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752357AbaEUSUP (ORCPT ); Wed, 21 May 2014 14:20:15 -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 1WnB7a-0000f8-Hr; Wed, 21 May 2014 18:20:10 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.80.1) (envelope-from ) id 1WnB7W-0000U6-7i; Wed, 21 May 2014 15:20:06 -0300 From: Mauro Carvalho Chehab Cc: Devin Heitmueller , Changbing Xiong , Trevor G , "Reynaldo H. Verdejo Pinochet" , Mauro Carvalho Chehab , Linux Media Mailing List , Mauro Carvalho Chehab Subject: [PATCH 5/8] xc5000: Don't wrap msleep() Date: Wed, 21 May 2014 15:19:59 -0300 Message-Id: <1400696402-1805-6-git-send-email-m.chehab@samsung.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1400696402-1805-1-git-send-email-m.chehab@samsung.com> References: <1400696402-1805-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=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 There's absolutely no reason to wrap msleep() call here. Just rename all occurences of xc_wait() with msleep() and remove the wrapper function. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/xc5000.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c index 94278cc5f3ef..a5dff9714836 100644 --- a/drivers/media/tuners/xc5000.c +++ b/drivers/media/tuners/xc5000.c @@ -293,11 +293,6 @@ static int xc5000_readreg(struct xc5000_priv *priv, u16 reg, u16 *val) return 0; } -static void xc_wait(int wait_ms) -{ - msleep(wait_ms); -} - static int xc5000_TunerReset(struct dvb_frontend *fe) { struct xc5000_priv *priv = fe->tuner_priv; @@ -342,7 +337,7 @@ static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData) /* busy flag cleared */ break; } else { - xc_wait(5); /* wait 5 ms */ + msleep(5); /* wait 5 ms */ WatchDogTimer--; } } @@ -374,7 +369,7 @@ static int xc_load_i2c_sequence(struct dvb_frontend *fe, const u8 *i2c_sequence) return result; } else if (len & 0x8000) { /* WAIT command */ - xc_wait(len & 0x7FFF); + msleep(len & 0x7FFF); index += 2; } else { /* Send i2c data whilst ensuring individual transactions @@ -571,7 +566,7 @@ static u16 WaitForLock(struct xc5000_priv *priv) while ((lockState == 0) && (watchDogCount > 0)) { xc_get_lock_status(priv, &lockState); if (lockState != 1) { - xc_wait(5); + msleep(5); watchDogCount--; } } @@ -687,7 +682,7 @@ static void xc_debug_dump(struct xc5000_priv *priv) * Frame Lines needs two frame times after initial lock * before it is valid. */ - xc_wait(100); + msleep(100); xc_get_ADC_Envelope(priv, &adc_envelope); dprintk(1, "*** ADC envelope (0-1023) = %d\n", adc_envelope); @@ -1137,7 +1132,7 @@ fw_retry: * I2C transactions until calibration is complete. This way we * don't have to rely on clock stretching working. */ - xc_wait(100); + msleep(100); if (priv->init_status_supported) { if (xc5000_readreg(priv, XREG_INIT_STATUS, &fw_ck) != 0) {