From patchwork Mon Jan 19 13:22:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5658761 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D643C058E for ; Mon, 19 Jan 2015 13:23:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4785E20386 for ; Mon, 19 Jan 2015 13:23:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4659820396 for ; Mon, 19 Jan 2015 13:23:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752081AbbASNXN (ORCPT ); Mon, 19 Jan 2015 08:23:13 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:61782 "EHLO mail-la0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbbASNXL (ORCPT ); Mon, 19 Jan 2015 08:23:11 -0500 Received: by mail-la0-f51.google.com with SMTP id ge10so7748244lab.10 for ; Mon, 19 Jan 2015 05:23:10 -0800 (PST) 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=1CMQNYgLqhHQMRLO8ZDcpvXwjxsfXRB7M3AFvlkXQSk=; b=lMrJhs9KAVeG3wgC0WQ5WyUl+444hEptpAnnhm+k5luKWQOhhNeyEkEU63qKSpi8Cd O52cnfhKgc/pT6uiEjfXI5flJ7d7eUP0Hzky5N9DQe0cy5KITClEJDSGWDjMHiyHOFM8 ybQzej/5Sicit2yXti6BRohJV8J4QB2Y2e72MFfcygJJpBz56EA+Xs8BQTDlJ1/jWcF8 zlINpHDFRovbqrtFRQGg23kg507GhDghAFP/z5DxRuhn+NzR1pzlPT7DVtMhoLtNLRn6 s4yFtZHSRCHrGJstYtonXHK4DuPW9VYkUjBr1nCemx5o/MKnIOSgIOBl7TORzYOjJQbu esbA== X-Gm-Message-State: ALoCoQm/wM2gs8MqkzVUEZGp1d/uBV6u3XBipwiioINdL/s/n9MFQm3/smwW3E0Ud7h1UzuT7v2b X-Received: by 10.152.88.44 with SMTP id bd12mr24424232lab.88.1421673790384; Mon, 19 Jan 2015 05:23:10 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id v4sm3080344lbz.12.2015.01.19.05.23.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jan 2015 05:23:09 -0800 (PST) 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, Kukjin Kim , Sylwester Nawrocki , Kyungmin Park , Ulf Hansson Subject: [PATCH V2 7/8] [media] exynos-gsc: Make system PM callbacks available for CONFIG_PM_SLEEP Date: Mon, 19 Jan 2015 14:22:39 +0100 Message-Id: <1421673760-2600-8-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> References: <1421673760-2600-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 system PM callbacks unless they are being used. It also causes compiler warnings about unused functions. Silence the warnings by making them available for CONFIG_PM_SLEEP. 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 0b126eb..194f9fc 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1188,6 +1188,7 @@ static int gsc_runtime_suspend(struct device *dev) } #endif +#ifdef CONFIG_PM_SLEEP static int gsc_resume(struct device *dev) { struct gsc_dev *gsc = dev_get_drvdata(dev); @@ -1224,10 +1225,10 @@ static int gsc_suspend(struct device *dev) return 0; } +#endif static const struct dev_pm_ops gsc_pm_ops = { - .suspend = gsc_suspend, - .resume = gsc_resume, + SET_SYSTEM_SLEEP_PM_OPS(gsc_suspend, gsc_resume) SET_RUNTIME_PM_OPS(gsc_runtime_suspend, gsc_runtime_resume, NULL) };