From patchwork Thu Jul 17 14:48:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4575991 Return-Path: X-Original-To: patchwork-linux-sh@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 518B69F26C for ; Thu, 17 Jul 2014 14:49:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92BF42018A for ; Thu, 17 Jul 2014 14:49:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B33E92017D for ; Thu, 17 Jul 2014 14:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934121AbaGQOtU (ORCPT ); Thu, 17 Jul 2014 10:49:20 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:65263 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934064AbaGQOtS (ORCPT ); Thu, 17 Jul 2014 10:49:18 -0400 Received: by mail-wi0-f171.google.com with SMTP id hi2so7894257wib.4 for ; Thu, 17 Jul 2014 07:49:17 -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=5jSHFlLy7pi/ttI6sAkmp1+LdVcEsPPSamOvI6fwvso=; b=WTc67mNAz2ewzFnn5GzTPDy76PNncw3fcISxKdcwEGdIsMyBE6r7rvMcDVyZyBkhtd WIWb9iFhghlkvDWlVveMh9f2Jrurxd/MWXazc773OBH+nXpq+mZq2SX25Y2Gi+yOYIFM Ewi7tbXAhcst4HctP2dQZgSok+D8G+F0Wh56ff1khsIcnLwDQjLHipFufRdTsPsLlyiY uoqPIKBrDsESk32x9JYuXqjGrfbQlOQBFM0UccRuKH+NWDZUbwGwta88VzLfGd/R3nf8 NpvfKrwjusVWhEgjaC/Nh8C7FpYnOxSUiUkRPxxAqBnIsuki2B8zD2qM+wMEEvrTZZeG 0uxQ== X-Received: by 10.194.243.10 with SMTP id wu10mr45940289wjc.44.1405608557084; Thu, 17 Jul 2014 07:49:17 -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.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:49:16 -0700 (PDT) From: Bastian Hecht To: linux-i2c@vger.kernel.org Cc: Linux-SH , Tomoya MORINAGA , Wolfram Sang , linux-arm-kernel@lists.infradead.org, Bastian Hecht , Laxman Dewangan , Stephen Warren , Thierry Reding , linux-tegra@vger.kernel.org (open list:TEGRA ARCHITECTUR...), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 5/5] i2c: tegra: Remove suspension check Date: Thu, 17 Jul 2014 16:48:40 +0200 Message-Id: <1405608520-5644-5-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> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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-tegra.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index f1bb2fc..c279d85 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -172,7 +172,6 @@ struct tegra_i2c_dev { size_t msg_buf_remaining; int msg_read; u32 bus_clk_rate; - bool is_suspended; }; static void dvc_writel(struct tegra_i2c_dev *i2c_dev, u32 val, unsigned long reg) @@ -628,9 +627,6 @@ static int tegra_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int i; int ret = 0; - if (i2c_dev->is_suspended) - return -EBUSY; - ret = tegra_i2c_clock_enable(i2c_dev); if (ret < 0) { dev_err(i2c_dev->dev, "Clock enable failed %d\n", ret); @@ -817,17 +813,6 @@ static int tegra_i2c_remove(struct platform_device *pdev) } #ifdef CONFIG_PM_SLEEP -static int tegra_i2c_suspend(struct device *dev) -{ - struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev); - - i2c_lock_adapter(&i2c_dev->adapter); - i2c_dev->is_suspended = true; - i2c_unlock_adapter(&i2c_dev->adapter); - - return 0; -} - static int tegra_i2c_resume(struct device *dev) { struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev); @@ -842,14 +827,12 @@ static int tegra_i2c_resume(struct device *dev) return ret; } - i2c_dev->is_suspended = false; - i2c_unlock_adapter(&i2c_dev->adapter); return 0; } -static SIMPLE_DEV_PM_OPS(tegra_i2c_pm, tegra_i2c_suspend, tegra_i2c_resume); +static SIMPLE_DEV_PM_OPS(tegra_i2c_pm, tegra_i2c_resume); #define TEGRA_I2C_PM (&tegra_i2c_pm) #else #define TEGRA_I2C_PM NULL