From patchwork Tue Oct 14 10:10:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 5079351 Return-Path: X-Original-To: patchwork-linux-media@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 482819F40A for ; Tue, 14 Oct 2014 10:11:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55A4120158 for ; Tue, 14 Oct 2014 10:11:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 805AF20142 for ; Tue, 14 Oct 2014 10:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755093AbaJNKKo (ORCPT ); Tue, 14 Oct 2014 06:10:44 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:55660 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753749AbaJNKKn (ORCPT ); Tue, 14 Oct 2014 06:10:43 -0400 Received: by mail-wg0-f42.google.com with SMTP id z12so10402419wgg.1 for ; Tue, 14 Oct 2014 03:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=iPdDeNYcdydDfFx/G9Hf97grfpbkmFPzxBLkrn5p4HM=; b=scPoDKxWqHSIghIUf/tFhHL7D6WrDgKAEs/TSNxEaWQ/pq7Yu7nQiDwMCZ4DJF/QRL iqLBOIl9MxuzT83TFNOJn3nP90+ft51YeAdUtZu6z4Dhvc8iqAePdIcLKXjy9v5mCWS/ eWK2TKs1ZU/Rrm24KlAf5ZfZpuWlRMwO6QRG28KTssceehTpskUDnxQPCeAg2PrzmAXO +Cu34g6sn/zkQQbr92Zv7WIJZNBH69aLUBTRjyhkfgflFjKXlDmhZuhEByqVEeDvH+0i v6X/nhbo0EjR4KK+RmVKQCti0F4WDBpSYLO+HUHgbbFFfSee5pFlHJilJClt4CNRaeIC ZV/A== X-Received: by 10.194.24.197 with SMTP id w5mr4121102wjf.71.1413281442610; Tue, 14 Oct 2014 03:10:42 -0700 (PDT) Received: from localhost (port-10658.pppoe.wtnet.de. [84.46.41.203]) by mx.google.com with ESMTPSA id om1sm19610775wjc.42.2014.10.14.03.10.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Oct 2014 03:10:42 -0700 (PDT) From: Thierry Reding To: Mauro Carvalho Chehab Cc: Geert Uytterhoeven , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] [media] s5p-jpeg: Only build suspend/resume for PM Date: Tue, 14 Oct 2014 12:10:40 +0200 Message-Id: <1413281440-2710-1-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 2.1.2 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_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 From: Thierry Reding If power management is disabled these function become unused, so there is no reason to build them. This fixes a couple of build warnings when PM(_SLEEP,_RUNTIME) is not enabled. Acked-by: Geert Uytterhoeven Signed-off-by: Thierry Reding --- Changes in v2: - add #endif comment for readability --- drivers/media/platform/s5p-jpeg/jpeg-core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index e525a7c8d885..ec7339e84b57 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -2632,6 +2632,7 @@ static int s5p_jpeg_remove(struct platform_device *pdev) return 0; } +#if defined(CONFIG_PM_RUNTIME) || defined(CONFIG_PM_SLEEP) static int s5p_jpeg_runtime_suspend(struct device *dev) { struct s5p_jpeg *jpeg = dev_get_drvdata(dev); @@ -2681,7 +2682,9 @@ static int s5p_jpeg_runtime_resume(struct device *dev) return 0; } +#endif /* CONFIG_PM_RUNTIME || CONFIG_PM_SLEEP */ +#ifdef CONFIG_PM_SLEEP static int s5p_jpeg_suspend(struct device *dev) { if (pm_runtime_suspended(dev)) @@ -2697,6 +2700,7 @@ static int s5p_jpeg_resume(struct device *dev) return s5p_jpeg_runtime_resume(dev); } +#endif static const struct dev_pm_ops s5p_jpeg_pm_ops = { SET_SYSTEM_SLEEP_PM_OPS(s5p_jpeg_suspend, s5p_jpeg_resume)