From patchwork Sat Jul 12 11:49:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4539271 Return-Path: X-Original-To: patchwork-linux-sh@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 4FC5DC0514 for ; Sat, 12 Jul 2014 11:49:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 62EE9201FA for ; Sat, 12 Jul 2014 11:49:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 927BF201F7 for ; Sat, 12 Jul 2014 11:49:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752464AbaGLLtt (ORCPT ); Sat, 12 Jul 2014 07:49:49 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:47181 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbaGLLts (ORCPT ); Sat, 12 Jul 2014 07:49:48 -0400 Received: by mail-wg0-f52.google.com with SMTP id a1so1429267wgh.23 for ; Sat, 12 Jul 2014 04:49:47 -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=QkJhjA8M6SgVxgGRtzzGTdtUMR9Ce+Ra/1Pxv82WYv4=; b=LRkhMCSL4bn8UwWEAZSscSr6H7HUWsShawP+vTYL2N41U9d1/4SGJXyCVeJ50jjcOS qJErqWU8a7pR/MLAZJSDY8NV2Un8N9ipPM5CuE0iquzf0MtB3n4yo9eCT6A6jYKi7SGp 8zIuyiD31A0HZR3RD5crGYmtPP8HtR2HU19svgf1GoOYxGsAY1KCUWFqHK7hdv11GJG2 g/nvoymgUaoK/enP7Sk3baTE3i97KRdrg9LiOg59q7PXcUO0whG3nlvq4yNxqAny0r5z t4xFxPwbOY1KJuqduooKncr9LHlchwJ4HtRwKomkfSooUi85l/JQZ6+bpOKzOp3btplU tLkQ== X-Received: by 10.194.89.168 with SMTP id bp8mr6306204wjb.73.1405165787059; Sat, 12 Jul 2014 04:49:47 -0700 (PDT) Received: from ipanema.Speedport_W723_V_Typ_A_1_01_001 (p4FD2114D.dip0.t-ipconnect.de. [79.210.17.77]) by mx.google.com with ESMTPSA id ey16sm5962198wid.14.2014.07.12.04.49.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Jul 2014 04:49:46 -0700 (PDT) From: Bastian Hecht To: linux-i2c@vger.kernel.org, Wolfram Sang Cc: Linux-SH , Tomoya MORINAGA , Naveen Krishna Chatradhi , Taekgyun Ko , Ben Dooks , Magnus Damm Subject: [PATCH 5/5] i2c: tegra: Remove suspension check Date: Sat, 12 Jul 2014 13:49:31 +0200 Message-Id: <1405165771-8732-5-git-send-email-hechtb@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405165771-8732-1-git-send-email-hechtb@gmail.com> References: <1405165771-8732-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=-7.4 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=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 We now take care of suspension in the i2c core code. So we can remove this check here. Signed-off-by: Bastian Hecht --- 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