From patchwork Wed Aug 3 17:59:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1032132 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p73HxCPO009314 for ; Wed, 3 Aug 2011 17:59:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754957Ab1HCR7K (ORCPT ); Wed, 3 Aug 2011 13:59:10 -0400 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:34815 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754719Ab1HCR7I (ORCPT ); Wed, 3 Aug 2011 13:59:08 -0400 Received: from mail-pz0-f43.google.com ([209.85.210.43]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTjmMaxtXe80O5cxKxNnQCl0Drcg8auxr@postini.com; Wed, 03 Aug 2011 10:59:08 PDT Received: by mail-pz0-f43.google.com with SMTP id 1so1865657pzk.2 for ; Wed, 03 Aug 2011 10:59:07 -0700 (PDT) Received: by 10.142.238.15 with SMTP id l15mr2530923wfh.201.1312394347338; Wed, 03 Aug 2011 10:59:07 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id l7sm1284147pbh.58.2011.08.03.10.59.06 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Aug 2011 10:59:06 -0700 (PDT) From: Kevin Hilman To: Ben Dooks , linux-omap@vger.kernel.org Cc: linux-i2c@vger.kernel.org, Shubhrajyoti D Subject: [PATCH] Revert "i2c-omap: fix static suspend vs. runtime suspend" Date: Wed, 3 Aug 2011 10:59:39 -0700 Message-Id: <1312394379-21516-1-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.6 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 03 Aug 2011 17:59:12 +0000 (UTC) This reverts commit adf6e07922255937c8bfeea777d19502b4c9a2be. Remove system PM methods which can race with runtime PM methods. Also, as of v3.1, the PM domain level code for OMAP handles device power state transistions automatically for devices, so calling them from Signed-off-by: Kevin Hilman --- Ben, with your ack, I'll queue this up with a couple other fixes to this driver for v3.1-rc. Thanks. drivers/i2c/busses/i2c-omap.c | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 84df53f..e854be0 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1148,41 +1148,12 @@ omap_i2c_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_SUSPEND -static int omap_i2c_suspend(struct device *dev) -{ - if (!pm_runtime_suspended(dev)) - if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend) - dev->bus->pm->runtime_suspend(dev); - - return 0; -} - -static int omap_i2c_resume(struct device *dev) -{ - if (!pm_runtime_suspended(dev)) - if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume) - dev->bus->pm->runtime_resume(dev); - - return 0; -} - -static struct dev_pm_ops omap_i2c_pm_ops = { - .suspend = omap_i2c_suspend, - .resume = omap_i2c_resume, -}; -#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops) -#else -#define OMAP_I2C_PM_OPS NULL -#endif - static struct platform_driver omap_i2c_driver = { .probe = omap_i2c_probe, .remove = omap_i2c_remove, .driver = { .name = "omap_i2c", .owner = THIS_MODULE, - .pm = OMAP_I2C_PM_OPS, }, };