From patchwork Mon Oct 13 20:23:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 399306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 955AC1400B0 for ; Tue, 14 Oct 2014 07:24:16 +1100 (EST) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XdmAA-0002z6-Q6; Mon, 13 Oct 2014 20:24:14 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XdmA8-0002yh-Kt for tpmdd-devel@lists.sourceforge.net; Mon, 13 Oct 2014 20:24:12 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.46 as permitted sender) client-ip=74.125.82.46; envelope-from=christophe.ricard@gmail.com; helo=mail-wg0-f46.google.com; Received: from mail-wg0-f46.google.com ([74.125.82.46]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1XdmA7-0005Sz-On for tpmdd-devel@lists.sourceforge.net; Mon, 13 Oct 2014 20:24:12 +0000 Received: by mail-wg0-f46.google.com with SMTP id l18so9414862wgh.17 for ; Mon, 13 Oct 2014 13:24:05 -0700 (PDT) X-Received: by 10.180.75.116 with SMTP id b20mr1091135wiw.49.1413231845562; Mon, 13 Oct 2014 13:24:05 -0700 (PDT) Received: from localhost.localdomain (ax113-6-78-236-204-66.fbx.proxad.net. [78.236.204.66]) by mx.google.com with ESMTPSA id p2sm13358739wiy.1.2014.10.13.13.24.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Oct 2014 13:24:04 -0700 (PDT) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: peterhuewe@gmx.de, ashley@ashleylai.com, tpmdd@selhorst.net Date: Mon, 13 Oct 2014 22:23:34 +0200 Message-Id: <1413231817-5174-13-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413231817-5174-1-git-send-email-christophe-h.ricard@st.com> References: <1413231817-5174-1-git-send-email-christophe-h.ricard@st.com> X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (christophe.ricard[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1XdmA7-0005Sz-On Cc: devicetree@vger.kernel.org, christophe.ricard@gmail.com, jean-luc.blanc@st.com, tpmdd-devel@lists.sourceforge.net, christophe-h.ricard@st.com Subject: [tpmdd-devel] [PATCH v3 12/15] tpm/tpm_i2c_stm_st33: Remove useless i2c read on interrupt registers X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net Remove useless i2c read on TPM_INT_ENABLE and TPM_INT_STATUS Signed-off-by: Christophe Ricard --- drivers/char/tpm/tpm_i2c_stm_st33.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c b/drivers/char/tpm/tpm_i2c_stm_st33.c index 388bb64..ed4176e 100644 --- a/drivers/char/tpm/tpm_i2c_stm_st33.c +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c @@ -184,7 +184,6 @@ static void clear_interruption(struct tpm_stm_dev *tpm_dev) I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1); I2C_WRITE_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1); - I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &interrupt, 1); } /* clear_interruption() */ /* @@ -725,10 +724,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) goto _tpm_clean_answer; } - r = I2C_READ_DATA(tpm_dev, TPM_INT_ENABLE, &intmask, 1); - if (r < 0) - goto _tpm_clean_answer; - intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_STS_VALID_INT | TPM_INTF_DATA_AVAIL_INT; @@ -742,10 +737,6 @@ tpm_stm_i2c_probe(struct i2c_client *client, const struct i2c_device_id *id) if (r < 0) goto _tpm_clean_answer; - r = I2C_READ_DATA(tpm_dev, TPM_INT_STATUS, &intmask, 1); - if (r < 0) - goto _tpm_clean_answer; - chip->vendor.irq = client->irq; disable_irq_nosync(chip->vendor.irq);