From patchwork Thu Apr 24 10:26:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 4048781 Return-Path: X-Original-To: patchwork-linux-omap@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 3031C9F1F4 for ; Thu, 24 Apr 2014 10:29:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6B9DA202DD for ; Thu, 24 Apr 2014 10:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE176202EC for ; Thu, 24 Apr 2014 10:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754960AbaDXK25 (ORCPT ); Thu, 24 Apr 2014 06:28:57 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:49014 "EHLO xavier.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755449AbaDXK0s (ORCPT ); Thu, 24 Apr 2014 06:26:48 -0400 Received: from ayla.of.borg ([84.193.72.141]) by xavier.telenet-ops.be with bizsmtp id tmSn1n00Q32ts5g01mSnmm; Thu, 24 Apr 2014 12:26:47 +0200 Received: from geert by ayla.of.borg with local (Exim 4.76) (envelope-from ) id 1WdGrf-0006vK-IM; Thu, 24 Apr 2014 12:26:47 +0200 From: Geert Uytterhoeven To: "Rafael J. Wysocki" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ben Dooks , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 6/6] of/clk: Use generic runtime and clock helpers Date: Thu, 24 Apr 2014 12:26:38 +0200 Message-Id: <1398335198-26555-7-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398335198-26555-1-git-send-email-geert+renesas@glider.be> References: <1398335198-26555-1-git-send-email-geert+renesas@glider.be> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Signed-off-by: Geert Uytterhoeven --- This depends on "of/clk: Register clocks suitable for Runtime PM with the PM core" --- drivers/of/of_clk.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/of/of_clk.c b/drivers/of/of_clk.c index 35f5e9f3dd42..3e8561dce998 100644 --- a/drivers/of/of_clk.c +++ b/drivers/of/of_clk.c @@ -8,38 +8,14 @@ #include #include #include -#include #ifdef CONFIG_PM_RUNTIME -static int of_clk_pm_runtime_suspend(struct device *dev) -{ - int ret; - - ret = pm_generic_runtime_suspend(dev); - if (ret) - return ret; - - ret = pm_clk_suspend(dev); - if (ret) { - pm_generic_runtime_resume(dev); - return ret; - } - - return 0; -} - -static int of_clk_pm_runtime_resume(struct device *dev) -{ - pm_clk_resume(dev); - return pm_generic_runtime_resume(dev); -} - static struct dev_pm_domain of_clk_pm_domain = { .ops = { - .runtime_suspend = of_clk_pm_runtime_suspend, - .runtime_resume = of_clk_pm_runtime_resume, + .runtime_suspend = pm_generic_runtime_clk_suspend, + .runtime_resume = pm_generic_clk_runtime_resume, USE_PLATFORM_PM_SLEEP_OPS }, };