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: 5658751 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 30DB2C058D for ; Mon, 19 Jan 2015 13:23:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4441320394 for ; Mon, 19 Jan 2015 13:23:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C6F1E2038F for ; Mon, 19 Jan 2015 13:23:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752056AbbASNXN (ORCPT ); Mon, 19 Jan 2015 08:23:13 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:48241 "EHLO mail-la0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbbASNXL (ORCPT ); Mon, 19 Jan 2015 08:23:11 -0500 Received: by mail-la0-f45.google.com with SMTP id gd6so5022647lab.4 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=d2uZyDcKveIgjUxNJCBlqlkHDHVTJMZlPKNu98LZeXpZh0Pay8LbvhFFcbI3z6HSda xhDgr+VkEm/vm1eN1pYfIEomX2YTr83cmyTD/I8THCndFcM8/Z723qMSLl0IJK5mnxIL nacl5zktsRX1ARe4j5gE98dWixU2SwckH5+haqIqS5QwA5CQYb3fEdAxRkyol/khQK1G lCPRYWDIcPUMq31qmQIMdMly+SB+PdeBZEyqT5W8EQGd8FIEpJK2qleL1Lv1fF5mXT9Z k6n+6D6SzauJPOkscO7qOfl0SfYQiTS8Ho1rE6kHapi+F/p4CJBI3xLQ0rkkdlAJ5Sk/ kYOQ== X-Gm-Message-State: ALoCoQmtw4paWi/aHY5vAt882HYnyqX4SKTAgJQ3yjy+41lz9ceaKUcUoNhBDmoW4LMnUqhwzisg 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-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 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) };