From patchwork Thu Jul 17 14:48:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4576081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 641F39F440 for ; Thu, 17 Jul 2014 14:51:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5887D201C0 for ; Thu, 17 Jul 2014 14:51:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D988201BF for ; Thu, 17 Jul 2014 14:51:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7mzy-0000Vx-SV; Thu, 17 Jul 2014 14:49:30 +0000 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7mzw-0000QX-CI for linux-arm-kernel@lists.infradead.org; Thu, 17 Jul 2014 14:49:28 +0000 Received: by mail-we0-f175.google.com with SMTP id t60so3243935wes.20 for ; Thu, 17 Jul 2014 07:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KhrghT6pA+G1Z0BeoI3uUR9P5qujJ/KTBKulSKAq7BE=; b=g47TaMKevf6WNY68a1sGagiL16rMvoMFGlR5LXFEqCbUB1JafWgiGHxdS07d5v/w4V sI3WPNgdAIZ+m/c7tk7IncZok575YLNIkiaTku5Z1qw+3VJTXsmODTgoJnzvixHiCgEM xmUmNQK0CK9PuoO0vhx69Vc6Fm1Xob8dsHiIEKpZaprM+2P8nRHThLCoKpMS5FUI2UfZ 5qimS/S2Oe3ug9N92k1KCPtZPa57kSipJMy1qBdJpsDd7yGTSs1LUuimrRdrBqk7rolY PgJN9fbNn3X5budx+qzmQy5NVB8WzKXs0duw73r9k7GoXOXHOtiJg+AnPtbZBTHJp51T HLUQ== X-Received: by 10.194.110.10 with SMTP id hw10mr45959011wjb.81.1405608545960; Thu, 17 Jul 2014 07:49:05 -0700 (PDT) Received: from ipanema.Speedport_W723_V_Typ_A_1_01_001 (p5B3C7F4A.dip0.t-ipconnect.de. [91.60.127.74]) by mx.google.com with ESMTPSA id di7sm6646044wjb.34.2014.07.17.07.49.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:49:05 -0700 (PDT) From: Bastian Hecht To: linux-i2c@vger.kernel.org Subject: [PATCH v2 2/5] i2c: eg20t: Remove suspension check Date: Thu, 17 Jul 2014 16:48:37 +0200 Message-Id: <1405608520-5644-2-git-send-email-hechtb@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405608520-5644-1-git-send-email-hechtb@gmail.com> References: <1405608520-5644-1-git-send-email-hechtb@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140717_074928_574372_7622409F X-CRM114-Status: GOOD ( 13.89 ) X-Spam-Score: -0.8 (/) Cc: Tomoya MORINAGA , Wolfram Sang , Linux-SH , Jingoo Han , Paul Gortmaker , open list , Bastian Hecht , Jean Delvare , Andreas Werner , linux-arm-kernel@lists.infradead.org, Laurent Pinchart X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no 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 We now take care of suspension in the i2c core code. So we can remove this check here. Signed-off-by: Bastian Hecht --- same as v1 drivers/i2c/busses/i2c-eg20t.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index a44ea13..aae0413 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c @@ -162,15 +162,12 @@ struct i2c_algo_pch_data { * struct adapter_info - This structure holds the adapter information for the PCH i2c controller * @pch_data: stores a list of i2c_algo_pch_data - * @pch_i2c_suspended: specifies whether the system is suspended or not - * perhaps with more lines and words. * @ch_num: specifies the number of i2c instance * * pch_data has as many elements as maximum I2C channels */ struct adapter_info { struct i2c_algo_pch_data pch_data[PCH_I2C_MAX_DEV]; - bool pch_i2c_suspended; int ch_num; }; @@ -677,13 +674,6 @@ static s32 pch_i2c_xfer(struct i2c_adapter *i2c_adap, if (ret) return ret; - if (adap->p_adapter_info->pch_i2c_suspended) { - mutex_unlock(&pch_mutex); - return -EBUSY; - } - - pch_dbg(adap, "adap->p_adapter_info->pch_i2c_suspended is %d\n", - adap->p_adapter_info->pch_i2c_suspended); /* transfer not completed */ adap->pch_i2c_xfer_in_progress = true; @@ -786,7 +776,6 @@ static int pch_i2c_probe(struct pci_dev *pdev, for (i = 0; i < adap_info->ch_num; i++) { pch_adap = &adap_info->pch_data[i].pch_adapter; - adap_info->pch_i2c_suspended = false; adap_info->pch_data[i].p_adapter_info = adap_info; @@ -862,8 +851,6 @@ static int pch_i2c_suspend(struct pci_dev *pdev, pm_message_t state) struct adapter_info *adap_info = pci_get_drvdata(pdev); void __iomem *p = adap_info->pch_data[0].pch_base_address; - adap_info->pch_i2c_suspended = true; - for (i = 0; i < adap_info->ch_num; i++) { while ((adap_info->pch_data[i].pch_i2c_xfer_in_progress)) { /* Wait until all channel transfers are completed */ @@ -912,8 +899,6 @@ static int pch_i2c_resume(struct pci_dev *pdev) for (i = 0; i < adap_info->ch_num; i++) pch_i2c_init(&adap_info->pch_data[i]); - adap_info->pch_i2c_suspended = false; - return 0; } #else