Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1324297ybf; Sun, 1 Mar 2020 06:37:24 -0800 (PST) X-Google-Smtp-Source: APXvYqw2ZUxqFLeRH2mrR7HTSLBoHTMOI1o6F9ywtRU6DlrQ9SMZQJHN/s+SfPDA1Q/oQwf49H6B X-Received: by 2002:aca:4bc6:: with SMTP id y189mr7149822oia.8.1583073444728; Sun, 01 Mar 2020 06:37:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583073444; cv=none; d=google.com; s=arc-20160816; b=05LRDKkWkYqhD5oKMTFqSiQM2DUr5HOu0gVA2kCY+jyQpcW3JkUW45vKWOOv/W6uYE QN0xVm2ax1PvYTZMcZsljPGDL8wZoUIVuXwceJlLHelB1rSI2zDbPU+7aVsJbRCZuaym pDwdH3EcsRKBgzCqGooNgxZHAl4g9e3YsSA5hmex8+E8oMQU9gj+w1RmYrMYzVCslets YDJ8uHXTc4X8E+s6x0SsW6N68jcTdzcfL+Pahr5rJlT9fRUcbOTEr1D9+heo/KojSdwh mpy+sNK/GL0DbbUNh5ZTow9uOfWT0dqkX4AT/Qd1/Bv2JdHfYxXBBOn9NHA94rbUMAEa 0ZDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=6U2P8pPXlDacy4G11sxq7t4jjTWf7QPA8viYtlqUTWA=; b=A0qolBRKaUOp3eYCXwlWKoWJXQXTXJjouYd71UARQ91T4ZzRBjh7NjbKn15XnyrUgx kwEfavRsY1/MB50SRjLS0tytS7GuvQT3z5NPgm7sxghZP6mo5O0JCH49taO5WBbny4lp idVgOB16SudQF+p+IVDFyeOdsKEqo5+AbfIapoFwHNhHYy6iXDWJQm0KAsXH+VMjWtWy MzGCjjcgYQpbVHGJLnCBedpED919pCPIwe23VouUNjRRue9R+prpyy2b/pP/88qnKXG7 SqwP+udzkJJ1PLe2p6IN4Zh9+Xj7ek09Go38m/IjP5FO28aGCmogx+MCVwhFNVFHi/U+ gkMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si4756565oto.205.2020.03.01.06.37.13; Sun, 01 Mar 2020 06:37:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726602AbgCAOhD (ORCPT + 99 others); Sun, 1 Mar 2020 09:37:03 -0500 Received: from inva021.nxp.com ([92.121.34.21]:42626 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbgCAOhD (ORCPT ); Sun, 1 Mar 2020 09:37:03 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id E3A42200C18; Sun, 1 Mar 2020 15:37:01 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3AB4B200B50; Sun, 1 Mar 2020 15:36:56 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 28FC6402D5; Sun, 1 Mar 2020 22:36:49 +0800 (SGT) From: Anson Huang To: rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP Date: Sun, 1 Mar 2020 22:30:56 +0800 Message-Id: <1583073056-32297-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simply the code. Signed-off-by: Anson Huang --- drivers/thermal/imx_thermal.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c index bb6754a..e75dda5 100644 --- a/drivers/thermal/imx_thermal.c +++ b/drivers/thermal/imx_thermal.c @@ -878,8 +878,7 @@ static int imx_thermal_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP -static int imx_thermal_suspend(struct device *dev) +static int __maybe_unused imx_thermal_suspend(struct device *dev) { struct imx_thermal_data *data = dev_get_drvdata(dev); struct regmap *map = data->tempmon; @@ -900,7 +899,7 @@ static int imx_thermal_suspend(struct device *dev) return 0; } -static int imx_thermal_resume(struct device *dev) +static int __maybe_unused imx_thermal_resume(struct device *dev) { struct imx_thermal_data *data = dev_get_drvdata(dev); struct regmap *map = data->tempmon; @@ -918,7 +917,6 @@ static int imx_thermal_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(imx_thermal_pm_ops, imx_thermal_suspend, imx_thermal_resume); -- 2.7.4