From patchwork Fri Jun 22 04:12:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 166480 X-Patchwork-Delegate: hs@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9BF2EB6EF1 for ; Fri, 22 Jun 2012 14:13:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F28972810F; Fri, 22 Jun 2012 06:13:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hn8KoHH-f2Gu; Fri, 22 Jun 2012 06:13:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81CBF280BF; Fri, 22 Jun 2012 06:12:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD6092808B for ; Fri, 22 Jun 2012 06:12:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qro3tJ42Z4bD for ; Fri, 22 Jun 2012 06:12:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by theia.denx.de (Postfix) with ESMTPS id 663722808C for ; Fri, 22 Jun 2012 06:12:29 +0200 (CEST) Received: by pbcwy7 with SMTP id wy7so2919147pbc.3 for ; Thu, 21 Jun 2012 21:12:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=9wHkMMuJ0N2yfzHU5SKk7mWy8BPfWlnI5EnzdVClthg=; b=DRuT5qZaQw/DAeqpZ7tPidZCgbdtkh9TDnCOxzE6b5HAxy6OF/zWI2qvj/3K3c9V8l l66GI8B/00M+JwlG4JsQG73Umg806qXNlSAYBcXknPMO5FP9EDG/fQrz0XgwH+jMLWvw FY1ohJmnuFldP4s+1QRCHf687KnwTJ8oyemjDbqAzgQe5JTvfyVaDymfLPWuJ3BpUc2q SMOpXN6/gaQ27gB6Ajb+Rrk0BW4M6Lz2rJopj1y1oNwO675HR5FNwtHpx4knWTx47D+P SH/52ho8zK9uMuanC1nO03jsI2v6mCqQwoYN+4SivKKMQCGCIWxMCRgSx7xXa9FkAClj vWBA== Received: by 10.68.225.101 with SMTP id rj5mr5377468pbc.103.1340338347322; Thu, 21 Jun 2012 21:12:27 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPS id hb5sm37665684pbc.58.2012.06.21.21.12.22 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 21:12:24 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.76) (envelope-from ) id 1ShvEL-00032f-LV; Thu, 21 Jun 2012 21:12:21 -0700 From: Troy Kisky To: hs@denx.de, sbabic@denx.de Date: Thu, 21 Jun 2012 21:12:03 -0700 Message-Id: <1340338339-11626-8-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> References: <1340338339-11626-1-git-send-email-troy.kisky@boundarydevices.com> X-Gm-Message-State: ALoCoQlHrLNzB9pjzA07kzNHvwhimla0mT0Vz1HuWQDcMaDv+Ng/Ej0CtqecED71xsBMnjZ0vCMR Cc: u-boot@lists.denx.de, r49496@freescale.com, jason.hui@linaro.org Subject: [U-Boot] [PATCH 08/24] mxc_i2c: remove redundant read X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de wait_for_sr_state returns i2sr on success so no need to read again. Signed-off-by: Troy Kisky Acked-by: Marek Vasut --- drivers/i2c/mxc_i2c.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 7b1b75c..9063d1e 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -193,7 +193,6 @@ static int tx_byte(struct mxc_i2c_regs *i2c_regs, u8 byte) ret = wait_for_sr_state(i2c_regs, ST_IIF); if (ret < 0) return ret; - ret = readb(&i2c_regs->i2sr); if (ret & I2SR_RX_NO_AK) return -ENODEV; return 0;