From patchwork Wed Sep 11 12:11:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Majewski X-Patchwork-Id: 828577 Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6787E18C912 for ; Wed, 11 Sep 2024 12:11:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056719; cv=none; b=MS8cXaRJnbD26lq8roembsd9I8+rd9iuvegv5UY6Uhc+B81ok6oxHEjx8Bh2fFYrdpVl/+WNdfakf1I2FDlcHXtoIq4u/bKcF6SRwiqqNCZaDnIvmjeEyO75JkFUtZUbeKD0ul7Mz7SeHpwmM/9slq1e0a6/78+DuAiYnzWcPy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726056719; c=relaxed/simple; bh=FEDEmbpAYmPOuuRo+RlDglGdJcWvHkw84rfZyKXuWo0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=HPA/7V/EJausNuwjO+306cUXMFWI3sByQ62StuFN9aVgUxt+hvAKTynrB2lVSFFwIwCjIOjkZe+bwki1+4NJHxSSFg/+prDwqaWEzJgAyjUaQFjqGQ55MkH3GyjWbHMqAYxjH+uclmKsZrVhToJFSGJUfdlH9NaQ25H1VDoaytI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=PeaPEPnd; arc=none smtp.client-ip=210.118.77.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="PeaPEPnd" Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240911121154euoutp027081469c3fce7314a99a5cb9643eec61~0L2-tbIst0111101111euoutp02B for ; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240911121154euoutp027081469c3fce7314a99a5cb9643eec61~0L2-tbIst0111101111euoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1726056715; bh=nvjwVOd+W/1Fy0GOMSwgEOErF159CdYtI3kdur0Gf6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PeaPEPndiNIlV2xAXlDfahN7GcyATXD+NEvPh2Zbdz/LMTaQFRQVZkhQuPaSvSDwe VUiXLN5cUM1EamPjagO/s3mxVBFjWcW1gCq1uPuvsaW3Iu3AmDgqThvB3ckpuV/f2F kC11hsfAG8kbsIEebVMPe8KTPCx3s0zHpQGQC0Gg= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20240911121154eucas1p2552975738977fa101ffa3a3c06d5579a~0L2_8pLtA1732517325eucas1p2r; Wed, 11 Sep 2024 12:11:54 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id B0.61.09875.90981E66; Wed, 11 Sep 2024 13:11:54 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4~0L2_Xdqg22858828588eucas1p2o; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240911121153eusmtrp2b14e07e38aec133391ae4431a80287ec~0L2_WRz632688526885eusmtrp2b; Wed, 11 Sep 2024 12:11:53 +0000 (GMT) X-AuditID: cbfec7f4-131ff70000002693-8f-66e18909b265 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 8B.4D.19096.90981E66; Wed, 11 Sep 2024 13:11:53 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20240911121152eusmtip124636a6e621dbf563a9446cfc7e7ca49~0L29Ypa2P3163131631eusmtip19; Wed, 11 Sep 2024 12:11:52 +0000 (GMT) From: Mateusz Majewski 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 , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Conor Dooley , Alim Akhtar , Sam Protsenko , Anand Moon , Marek Szyprowski Subject: [PATCH v4 2/7] drivers/thermal/exynos: use pm_sleep_ptr instead of conditional compilation Date: Wed, 11 Sep 2024 14:11:25 +0200 Message-ID: <20240911121136.1120026-3-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240911121136.1120026-1-m.majewski2@samsung.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrCKsWRmVeSWpSXmKPExsWy7djP87pcnQ/TDHovM1k8mLeNzeL7lutM Fmv2nmOymPdZ1mL+kXOsFufPb2C32PT4Gqv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0g5YWXh+g549LaXyoLQg0/3uIpPj71 Q9HGXzxKLMUZiYZazEXFiQCKAhD+VwMAAA== X-CMS-MailID: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 X-Msg-Generator: CA X-RootMTR: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240911121153eucas1p20f864c51746e6a7de55ecd0e52efe5c4 References: <20240911121136.1120026-1-m.majewski2@samsung.com> Slightly simpler and nothing is lost if _suspend and _resume functions are built unconditionally. Suggested-by: Anand Moon Reviewed-by: Sam Protsenko Signed-off-by: Mateusz Majewski --- 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,