From patchwork Tue Oct 14 07:15:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5078451 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 0FCDB9F349 for ; Tue, 14 Oct 2014 07:16:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F5952016C for ; Tue, 14 Oct 2014 07:16:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70F8020154 for ; Tue, 14 Oct 2014 07:16:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754489AbaJNHQG (ORCPT ); Tue, 14 Oct 2014 03:16:06 -0400 Received: from mail-la0-f46.google.com ([209.85.215.46]:34092 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754360AbaJNHQD (ORCPT ); Tue, 14 Oct 2014 03:16:03 -0400 Received: by mail-la0-f46.google.com with SMTP id gi9so7948602lab.19 for ; Tue, 14 Oct 2014 00:16:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B6aGEyAoSYfAm/10cr8jSF4a6pnlS+G5Nv1f3r8FQhE=; b=PsGXLFyx4G/bFQq7vS+VoCL/sjOPTXau/w6H5KE1iMS6qlQ8YA7RTQ5sT4HqsUNeNB Z/wl02LhjLdI40myOkvZQAKb8L90IQlokRJ6yWLqc4BrauCarjFvHt6lEtKTLzpj/raB 9nE4NCzNavf5I5P95ad1Viw5IZDpK1t31EzY071npsIdRuQTfAPI8JxACyEiRc7PEN12 wEltNpph5ahs2zTcalXe+VOoHgtHoAINB5tlC4BZA7Q2WM752otE/Y1I0KyageAR9Nh1 7FvbMWUTt+VsMLdwmmb6HE8kD05dbXVhSbjxVuKno3GdnjDQpMdGC1+JBLLhUR92d0FP RTYg== X-Gm-Message-State: ALoCoQlrbr2JcTIg+xBiPWCeV8R1e3adHa0NzB9y3dsHLezL+9zfY24IXOGyqf/H9U4kBYMa9ouP X-Received: by 10.112.147.225 with SMTP id tn1mr3311361lbb.37.1413270961823; Tue, 14 Oct 2014 00:16:01 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id a2sm5279497lbs.21.2014.10.14.00.15.59 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Oct 2014 00:16:01 -0700 (PDT) From: Ulf Hansson To: Mauro Carvalho Chehab , linux-media@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, Geert Uytterhoeven , Kevin Hilman , Tomasz Figa , Kukjin Kim , Philipp Zabel , Sylwester Nawrocki , "Rafael J. Wysocki" , Pavel Machek , Ulf Hansson Subject: [PATCH 4/7] [media] exynos-gsc: Make runtime PM callbacks available for CONFIG_PM Date: Tue, 14 Oct 2014 09:15:37 +0200 Message-Id: <1413270940-4378-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413270940-4378-1-git-send-email-ulf.hansson@linaro.org> References: <1413270940-4378-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 There are no need to set up the runtime PM callbacks unless they are being used. Let's make them available for CONFIG_PM. Signed-off-by: Ulf Hansson --- drivers/media/platform/exynos-gsc/gsc-core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index c3a050e..361a807 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1150,6 +1150,7 @@ static int gsc_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_PM static int gsc_runtime_resume(struct device *dev) { struct gsc_dev *gsc = dev_get_drvdata(dev); @@ -1180,6 +1181,7 @@ static int gsc_runtime_suspend(struct device *dev) pr_debug("gsc%d: state: 0x%lx", gsc->id, gsc->state); return ret; } +#endif static int gsc_resume(struct device *dev) { @@ -1221,8 +1223,7 @@ static int gsc_suspend(struct device *dev) static const struct dev_pm_ops gsc_pm_ops = { .suspend = gsc_suspend, .resume = gsc_resume, - .runtime_suspend = gsc_runtime_suspend, - .runtime_resume = gsc_runtime_resume, + SET_PM_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL) }; static struct platform_driver gsc_driver = {