From patchwork Thu Jul 17 14:48:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4576101 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 602729F26C for ; Thu, 17 Jul 2014 14:51:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B4652017D for ; Thu, 17 Jul 2014 14:51:29 +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 8F4DE20160 for ; Thu, 17 Jul 2014 14:51:28 +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 1X7n0G-0000fY-BC; Thu, 17 Jul 2014 14:49:48 +0000 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X7n02-0000Rm-Ju for linux-arm-kernel@lists.infradead.org; Thu, 17 Jul 2014 14:49:35 +0000 Received: by mail-we0-f177.google.com with SMTP id w62so3228567wes.36 for ; Thu, 17 Jul 2014 07:49:12 -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=yKLp3Nlet+PomHvVJuoPkmHirNxdcyp5TjMmXexAWJ0=; b=doFA3C8iZdoq0CB637i51J6LLK397fzXNBpWwB5f1BEXB117mCoLExrY+82SS5hAqH PdgPBoxo0AO45Cg9UF69dVcBKja3jmbNsZq+89BEjyH8Xnd5qOL/4hVOGxqG9o2+76OX q9Y5cul2jvJsPI9NHkElY/05M5FlF2I+W5hZAjJKDRT/Bt4ju3iBAISY9GnBS2T/n8xJ WjszS8/erQQ1JRXhciIg8V18H3ikWy1tJl7K5D6Pir9+dyMIBsV95e14SHqdt0pWWTqL nt0v041u0U7nbr4GYz5OqKiJPEu0pEHr/ufzVfrkRX02ABKssU4NRJ+QgmT4B4S9iRl6 kjNQ== X-Received: by 10.180.221.108 with SMTP id qd12mr22877209wic.83.1405608552598; Thu, 17 Jul 2014 07:49:12 -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.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:49:11 -0700 (PDT) From: Bastian Hecht To: linux-i2c@vger.kernel.org Subject: [PATCH v3 3/5] i2c: exynos5: Remove suspension check Date: Thu, 17 Jul 2014 16:48:38 +0200 Message-Id: <1405608520-5644-3-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_074934_846011_7DB5BE6E X-CRM114-Status: GOOD ( 13.45 ) X-Spam-Score: -0.8 (/) Cc: Jingoo Han , Kukjin Kim , Wolfram Sang , Linux-SH , Linus Walleij , Tomoya MORINAGA , open list , Masanari Iida , Bastian Hecht , "moderated list:ARM/S5P EXYNOS AR..." , Jean Delvare , Naveen Krishna Ch , linux-arm-kernel@lists.infradead.org, Sachin Kamat 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-exynos5.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index 63d2292..a80cf28 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -145,7 +145,6 @@ struct exynos5_i2c { struct i2c_adapter adap; - unsigned int suspended:1; struct i2c_msg *msg; struct completion msg_complete; @@ -610,11 +609,6 @@ static int exynos5_i2c_xfer(struct i2c_adapter *adap, struct exynos5_i2c *i2c = adap->algo_data; int i = 0, ret = 0, stop = 0; - if (i2c->suspended) { - dev_err(i2c->dev, "HS-I2C is not initialized.\n"); - return -EIO; - } - clk_prepare_enable(i2c->clk); for (i = 0; i < num; i++, msgs++) { @@ -757,16 +751,6 @@ static int exynos5_i2c_remove(struct platform_device *pdev) } #ifdef CONFIG_PM_SLEEP -static int exynos5_i2c_suspend_noirq(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct exynos5_i2c *i2c = platform_get_drvdata(pdev); - - i2c->suspended = 1; - - return 0; -} - static int exynos5_i2c_resume_noirq(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -783,14 +767,12 @@ static int exynos5_i2c_resume_noirq(struct device *dev) exynos5_i2c_init(i2c); clk_disable_unprepare(i2c->clk); - i2c->suspended = 0; return 0; } #endif -static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_suspend_noirq, - exynos5_i2c_resume_noirq); +static SIMPLE_DEV_PM_OPS(exynos5_i2c_dev_pm_ops, exynos5_i2c_resume_noirq); static struct platform_driver exynos5_i2c_driver = { .probe = exynos5_i2c_probe,