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: 38690 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC8E220549 for ; Tue, 14 Oct 2014 07:16:04 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf4845853lab.5 for ; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=B6aGEyAoSYfAm/10cr8jSF4a6pnlS+G5Nv1f3r8FQhE=; b=XponHSEEcUlj2sQRP4u5U6P9OO7DlbisScLHiGIcsEKFQnfHEpmTZFUXrTykJ84y6v elTZaIBTJLsUvMJVgRzSCO6aTsRa6Plxkxi+I3tNs3plfizl4AUIlTGPAYq3Xs42vPlA 9/3H0Zists2eJLo4cMsId882kVaHmYVqCf510S0aNHr+rQbKgJt4+MN58AKdVriWUjAz npF3k3e9VtCOj7+/OqWeYbhMpstgFIwY124594tL//JG6UKT84ZY6uF/Lv/RjoO4VvIi QQPJKrN03Z866I1kdh4fRAFB2CnCzHMIHoC8N1/oqTvrP/Mu79JYudxVRU1YypYn/2+r r8kA== X-Gm-Message-State: ALoCoQkcG8S+XNTiHUJllLM/9LGdREAekgCkMUPNdYUOTQ11RHi5UwCkE5kgfd67+6uhWS7K12d0 X-Received: by 10.152.4.165 with SMTP id l5mr252771lal.4.1413270963419; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.130 with SMTP id l2ls520076lag.45.gmail; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) X-Received: by 10.152.243.39 with SMTP id wv7mr3350863lac.48.1413270963160; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx.google.com with ESMTPS id ul7si25330667lbb.8.2014.10.14.00.16.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 00:16:03 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id gm9so7990706lab.13 for ; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) X-Received: by 10.112.221.197 with SMTP id qg5mr3420913lbc.32.1413270963091; Tue, 14 Oct 2014 00:16:03 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.84.229 with SMTP id c5csp345549lbz; Tue, 14 Oct 2014 00:16:02 -0700 (PDT) X-Received: by 10.152.115.131 with SMTP id jo3mr3461365lab.20.1413270961931; Tue, 14 Oct 2014 00:16:01 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id x2si25124418lae.118.2014.10.14.00.16.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 14 Oct 2014 00:16:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id s18so7916771lam.23 for ; Tue, 14 Oct 2014 00:16:01 -0700 (PDT) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 = {