From patchwork Sat Jul 12 11:49:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4539251 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 9393F9F1D6 for ; Sat, 12 Jul 2014 11:49:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B0E2E201F7 for ; Sat, 12 Jul 2014 11:49:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8D47201FA for ; Sat, 12 Jul 2014 11:49:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbaGLLtp (ORCPT ); Sat, 12 Jul 2014 07:49:45 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:64599 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751720AbaGLLto (ORCPT ); Sat, 12 Jul 2014 07:49:44 -0400 Received: by mail-wi0-f182.google.com with SMTP id d1so452310wiv.3 for ; Sat, 12 Jul 2014 04:49:43 -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=vwsREx6sVMlsVzwGe397X/qHxA1/AGrDpt1HQocXtAo=; b=yYg/6IavRhARpFu4w7cV71ofDb5kN7gUDvd5ZH/qp/R92m/uigSpGv56L304t7QlPh d85ojqKKrbBynS0b8NedRXQXczqJWZzOFyc7XHLQbYqoUn4DT7FvvMFtim7mKDBhsWTM mzQviwI6f5yZi858RRjvsuTINBQiShujH/CsRUTO95wynKkq7Ipfl0esxBGGdVMKpwRO Ewec7efYpDvwDC1Z1TKHdfAGACMIigqDWV584DwZDZXuK+K6PmqWWkWxsperWeuqk+Yl gv7Mha2dANYQIUzWC7R8GfzpBx6eiN7BGwsrYLGICA9V8gcoVushjjHzZ/m60GYcc67z ur4Q== X-Received: by 10.180.91.225 with SMTP id ch1mr12618720wib.34.1405165783201; Sat, 12 Jul 2014 04:49:43 -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.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 12 Jul 2014 04:49:42 -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 3/5] i2c: exynos5: Remove suspension check Date: Sat, 12 Jul 2014 13:49:29 +0200 Message-Id: <1405165771-8732-3-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-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,