Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2014758ybf; Sun, 1 Mar 2020 23:57:38 -0800 (PST) X-Google-Smtp-Source: APXvYqxf4jj2rdhDIaDZNax6hGQJcdKaboXfoVJPL3b/jYjDxkv04a0oZPPpbVnmtuSpeKal9E32 X-Received: by 2002:aca:1a06:: with SMTP id a6mr10301254oia.148.1583135857997; Sun, 01 Mar 2020 23:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583135857; cv=none; d=google.com; s=arc-20160816; b=Xx0bC+JaZVcScPzVfBOkNJSX9IoDrQnuANVYwGGoWz+aRYEK/YavYMsQQ+guwMS/lL ZpyWLKlF6ISdZUwR0VbN9fG2chAp5no2rHOlC4kp++hTa9bYsJytQNiJ27JH6TrJy8iL Wweb7Hqr80sDac7xvN0oN/SG05YeXXZ7cacJOdjyQ7rcqOt4GJ5Z/c+QK74gAtIjoqyN n7DtdctE3gylqaWOmKIr69vDVS1mU40+UxJWh/oPcoNW2aqq0Jvr0unSqWshBqZiDq8w opTczlmrnY3VSVHKFrmUcm+nR1DN1CE1XivLMf5gOGsKZaQ+McMupVbiYc4lR710DPpH R1VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=8eKtawLOLWMZGg3d2Rd2rOjP+oNTGhxy2koAt7lJRIc=; b=j7PyphYH2wWtEQo56SPOwyWvv3xo9PdqPF0RSjWcOdLYVW7r3MieNtlzW4I1252N2/ dILIxCRVvWHf/db9RRC9pthPAP+eivy3je2GpbNv5pY/HZ4irwd0eWkc7h4VDAInr8K7 D+C0WU1xKvsZqNtVA7gqTNBZ2nC+FXRhI+2S0YbztpUVueyhp1atmz1IYLErMduHZji6 ElH5ygcJY5SW5o4ATHEqlOlxhaQ6u5iscstjtAWhZgtaveECrSC1U0QS36nBwo7NPotP UFvZE3okJlBWCQdmFe0uHSfK6jTvFJAZiFxny1aGxRSX4zFxxFywuGKq1skZpZZjntCc 8mxw== 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 b12si1128965otq.123.2020.03.01.23.57.25; Sun, 01 Mar 2020 23:57:37 -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 S1727138AbgCBH4T (ORCPT + 99 others); Mon, 2 Mar 2020 02:56:19 -0500 Received: from inva021.nxp.com ([92.121.34.21]:46186 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgCBH4T (ORCPT ); Mon, 2 Mar 2020 02:56:19 -0500 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id BDACF200F0E; Mon, 2 Mar 2020 08:56:17 +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 18EFF200F14; Mon, 2 Mar 2020 08:56:12 +0100 (CET) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7DEBB40299; Mon, 2 Mar 2020 15:56:05 +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 V2] thermal: imx_thermal: Use __maybe_unused instead of CONFIG_PM_SLEEP Date: Mon, 2 Mar 2020 15:50:10 +0800 Message-Id: <1583135410-7496-1-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Uwe Kleine-König --- Changes since V1: - fix typo of commit message, simply->simplify. --- 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