From: Mateusz Majewski <m.majewski2@samsung.com>
To: linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: Mateusz Majewski <m.majewski2@samsung.com>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>, Rob Herring <robh@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
Sam Protsenko <semen.protsenko@linaro.org>,
Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v3 2/6] drivers/thermal/exynos: use pm_sleep_ptr instead of conditional compilation
Date: Wed, 7 Aug 2024 10:48:21 +0200 [thread overview]
Message-ID: <20240807084829.1037303-3-m.majewski2@samsung.com> (raw)
In-Reply-To: <20240807084829.1037303-1-m.majewski2@samsung.com>
Slightly simpler and nothing is lost if _suspend and _resume functions
are built unconditionally.
Suggested-by: Anand Moon <linux.amoon@gmail.com>
Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
---
drivers/thermal/samsung/exynos_tmu.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 9b7ca93a72f1..b68e9755c933 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1132,7 +1132,6 @@ static void exynos_tmu_remove(struct platform_device *pdev)
clk_unprepare(data->clk_sec);
}
-#ifdef CONFIG_PM_SLEEP
static int exynos_tmu_suspend(struct device *dev)
{
exynos_tmu_control(to_platform_device(dev), false);
@@ -1152,15 +1151,11 @@ static int exynos_tmu_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(exynos_tmu_pm,
exynos_tmu_suspend, exynos_tmu_resume);
-#define EXYNOS_TMU_PM (&exynos_tmu_pm)
-#else
-#define EXYNOS_TMU_PM NULL
-#endif
static struct platform_driver exynos_tmu_driver = {
.driver = {
.name = "exynos-tmu",
- .pm = EXYNOS_TMU_PM,
+ .pm = pm_sleep_ptr(&exynos_tmu_pm),
.of_match_table = exynos_tmu_match,
},
.probe = exynos_tmu_probe,
--
2.45.1
next prev parent reply other threads:[~2024-08-07 8:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240807084901eucas1p1feb6a9a89cd6b358380f35f0e3228dfe@eucas1p1.samsung.com>
2024-08-07 8:48 ` [PATCH v3 0/6] Add initial Exynos850 support to the thermal driver Mateusz Majewski
2024-08-07 8:48 ` [PATCH v3 1/6] drivers/thermal/exynos: use DEFINE_SIMPLE_DEV_PM_OPS Mateusz Majewski
2024-08-07 8:48 ` Mateusz Majewski [this message]
2024-08-07 8:48 ` [PATCH v3 3/6] drivers/thermal/exynos: improve sanitize_temp_error Mateusz Majewski
2024-09-02 12:50 ` Daniel Lezcano
2024-09-03 7:19 ` Mateusz Majewski
2024-09-06 10:04 ` Daniel Lezcano
2024-08-07 8:48 ` [PATCH v3 4/6] dt-bindings: thermal: samsung,exynos: add exynos850-tmu string Mateusz Majewski
2024-08-11 12:34 ` Krzysztof Kozlowski
2024-08-07 8:48 ` [PATCH v3 5/6] drivers/thermal/exynos: add initial Exynos850 support Mateusz Majewski
2024-08-07 8:48 ` [PATCH v3 6/6] dt-bindings: thermal: samsung,exynos: remove driver-specific information Mateusz Majewski
2024-08-11 12:35 ` Krzysztof Kozlowski
2024-08-12 16:41 ` Rob Herring (Arm)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240807084829.1037303-3-m.majewski2@samsung.com \
--to=m.majewski2@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=bzolnier@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux.amoon@gmail.com \
--cc=lukasz.luba@arm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=semen.protsenko@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox