Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2061407ybf; Mon, 2 Mar 2020 01:02:03 -0800 (PST) X-Google-Smtp-Source: ADFU+vvHKlTgitYF/CkGXS8Md4x6ZjQyYS9RSnMiFXSdPDmrHsqgrlDjh7FW0ZOQXvoogwf8wJZc X-Received: by 2002:aca:3544:: with SMTP id c65mr2132882oia.160.1583139723447; Mon, 02 Mar 2020 01:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583139723; cv=none; d=google.com; s=arc-20160816; b=IhJRmdH/OVdlgSO3SRkW86LKyUSHsaAhAwvTPbhhOri43huxI9q+3+Cs0RaG8/vc70 mDCBCIoq4bK8u3gy8JFnLG7ILJWJOVX+mn4YXWaFnZHNp173+y1LGyqe6mLYo/r802+8 b4rbzvEm4IuuX5RNd8moiTUEoE/L77x6BnU8xhuSkkvHAESXcG9+ksJmxSMjlfYQUJVb NASAH7kGojA8IwnPU2itIRnjLixDTmK+H7ntSHlZEn12p6zDE2KYVlxMU+B+qmOJ3qer 8CiXiIKURGZCAIF+3k0wTuyIS5V/zn6abvw5kKW1DybWNtaXpX3rk8SWj39l5fXIJ5K7 sa9A== 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=UqgOco4J1fhBB88iox2s/VCRewN4tIKj5yuT/A+5UXE=; b=Is+yJQpv7K8chTUR5IR0P0sjf41WYjrcmz043V0YigF/n2H2bGMZnOFA4E4b60hDZt 42FpI1SnCwhYs2ciReUwmZsESe9rMJuez4X1P8/WGrndTVB27a2VCqQtyPffIXNc2AuB pnnwknIQBgPuEaCH//sWiAcB205pJ+jSQwcW/EQaSGNBIQBFaPOChK9pjsRNkBWMl1rh 8K2b9qi1UsCwccgcRht3EHLT5YL7a14UIdiwOryGGtfZVi6PjijOTDw5+RserLsB/w4l rVhx9ZRrk3aA+rwsm91db6OlWuk0cm12mmH6XGLgh6V3lQm4VBDQG0T6nw6AMhnzMfQO UEWA== 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 h9si6041089oti.155.2020.03.02.01.01.51; Mon, 02 Mar 2020 01:02:03 -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 S1726874AbgCBJAe (ORCPT + 99 others); Mon, 2 Mar 2020 04:00:34 -0500 Received: from inva021.nxp.com ([92.121.34.21]:58118 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726313AbgCBJAe (ORCPT ); Mon, 2 Mar 2020 04:00:34 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D8DF3200F3E; Mon, 2 Mar 2020 10:00:32 +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 3462E20017C; Mon, 2 Mar 2020 10:00:27 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 9A08C402A7; Mon, 2 Mar 2020 17:00:20 +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 V3] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP Date: Mon, 2 Mar 2020 16:54:26 +0800 Message-Id: <1583139266-23615-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 simplify the code. Signed-off-by: Anson Huang --- Changes since V2: - drop the reviewed-by tag. --- 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