From patchwork Thu Jul 17 14:48:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastian Hecht X-Patchwork-Id: 4576031 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 40E799F26C for ; Thu, 17 Jul 2014 14:50:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 72BC62011B for ; Thu, 17 Jul 2014 14:50:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83AE22017D for ; Thu, 17 Jul 2014 14:50:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934064AbaGQOt4 (ORCPT ); Thu, 17 Jul 2014 10:49:56 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:54197 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933968AbaGQOtQ (ORCPT ); Thu, 17 Jul 2014 10:49:16 -0400 Received: by mail-we0-f176.google.com with SMTP id q58so3206412wes.21 for ; Thu, 17 Jul 2014 07:49:14 -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=hLoWhAb2YLqJ3JhqT9fyLVz6kYJtlqizMFbzoWSkmc8=; b=ZvT4itoyOY+CZf/S1tq9wZ5XyRJdcSMY1L4W+CFCiYutHT67Gzgcqh+0cW03sFjqSF AuWN1jvzggy24vFCB/wBXiBymG400ct6HvithEEXjF6/XC6GCEXtdSg70MBuCd60KRvZ mDgUzCzUspwnam2s5JDtLaH9FuqTRD4lIQhSK+fFTo1ZLWLDzJyYxT4v1xQGdVlYQJyv VI4PO/Gk53qeSiPGTnwCbvPZzIixJVaMlknEBqwk97BfIFDP7TP1yJ4jlr0+VibqAloQ YBFKCnu3sWkpMmQheIgOptgSs6/E1/lAWM12rHOWdBsouYy7t6Tn2+GHY0pJor3ODNBI 0sxg== X-Received: by 10.180.74.42 with SMTP id q10mr22825955wiv.39.1405608554805; Thu, 17 Jul 2014 07:49:14 -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.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:49:14 -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 , Ben Dooks , Kukjin Kim , linux-samsung-soc@vger.kernel.org (moderated list:ARM/SAMSUNG ARM A...), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2 4/5] i2c: sc3c2410: Remove suspension check Date: Thu, 17 Jul 2014 16:48:39 +0200 Message-Id: <1405608520-5644-4-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-s3c2410.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e828a1d..568b993 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -103,7 +103,6 @@ enum s3c24xx_i2c_state { struct s3c24xx_i2c { wait_queue_head_t wait; kernel_ulong_t quirks; - unsigned int suspended:1; struct i2c_msg *msg; unsigned int msg_num; @@ -714,9 +713,6 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, unsigned long timeout; int ret; - if (i2c->suspended) - return -EIO; - ret = s3c24xx_i2c_set_master(i2c); if (ret != 0) { dev_err(i2c->dev, "cannot get bus (error %d)\n", ret); @@ -1257,16 +1253,6 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) } #ifdef CONFIG_PM_SLEEP -static int s3c24xx_i2c_suspend_noirq(struct device *dev) -{ - struct platform_device *pdev = to_platform_device(dev); - struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); - - i2c->suspended = 1; - - return 0; -} - static int s3c24xx_i2c_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -1275,7 +1261,6 @@ static int s3c24xx_i2c_resume(struct device *dev) clk_prepare_enable(i2c->clk); s3c24xx_i2c_init(i2c); clk_disable_unprepare(i2c->clk); - i2c->suspended = 0; return 0; } @@ -1284,7 +1269,6 @@ static int s3c24xx_i2c_resume(struct device *dev) #ifdef CONFIG_PM static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend_noirq = s3c24xx_i2c_suspend_noirq, .resume = s3c24xx_i2c_resume, #endif };