From patchwork Wed Aug 7 08:48:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Majewski X-Patchwork-Id: 13756016 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A29A4C52D6F for ; Wed, 7 Aug 2024 08:51:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:MIME-Version:In-Reply-To:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JihNWS+qQKkN2JSqVKvJDHUfHhnpQ/g8G2um7745xXE=; b=rB4hRWSvCEdU443F9cZgYQfmST ivyygxRE44VWloEiqpzvSTWA6TLfHI17BKxo208m8IXHv8l98Ycr233oSe+/yuyOOtP7N6f7jp7IP +KWoNXj3EgsJje4o4Rkv+0c7rdCOyVwXe4smpXKgbD+/7QE5A1hrv7Svqmeh21tQG3TX5pN5pWPn5 DAsAHffI4BfDCy44FjD3u7BcnDn3QkDZvdOSijo8lCVH0+TDu6EP1Kpmw+0Y7HVe9rC2tl9MxlV8S PvP3nDehzyiU2WQPc2zd8nxwdWOJlQI+mFUGu5Lzp5YvLh8nc/Cw7pCTzPUwO/lC71S026LyQ8LUA 2FhSFkvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbcO7-00000004RPH-3LcS; Wed, 07 Aug 2024 08:51:19 +0000 Received: from mailout1.w1.samsung.com ([210.118.77.11]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbcM9-00000004QqF-1Itm for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2024 08:49:19 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240807084911euoutp017bf0b1d79ea460bc47bd30c8334bc946~pZhAJPFte1700017000euoutp01D for ; Wed, 7 Aug 2024 08:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240807084911euoutp017bf0b1d79ea460bc47bd30c8334bc946~pZhAJPFte1700017000euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1723020551; bh=JihNWS+qQKkN2JSqVKvJDHUfHhnpQ/g8G2um7745xXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BID5LYoHS4XAqiaabpZXw0bXrpS9OxvCsEcRk/6nZb7A3dPo83mmf6UxWavQadr/d vcxc/XenE3AKUc4NLrI/nxqElyHJL1rUwXDEy+9U2bPwd1KJD2ywq9LNFUhbU4/hKC MPWrJpyMfNynHQ0F6Ipo274jA+RPxdbSPIOMAkuo= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240807084911eucas1p1c0be09084f4cec4ae6bf24519589f2ec~pZg-3B0Sh0340503405eucas1p1a; Wed, 7 Aug 2024 08:49:11 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id A9.02.09624.70533B66; Wed, 7 Aug 2024 09:49:11 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20240807084910eucas1p169d15e8209328d18230575a031e0a163~pZg-VQDGW0115601156eucas1p1E; Wed, 7 Aug 2024 08:49:10 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240807084910eusmtrp24210bd69ac355404823281e007c45bb5~pZg-UgD5n2321823218eusmtrp2C; Wed, 7 Aug 2024 08:49:10 +0000 (GMT) X-AuditID: cbfec7f2-c11ff70000002598-23-66b335071461 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id 67.DC.09010.60533B66; Wed, 7 Aug 2024 09:49:10 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240807084909eusmtip2952ba1ee9fc9058824f45180bc5d63af~pZg_azF9A1949919499eusmtip2R; Wed, 7 Aug 2024 08:49:09 +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 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 Message-ID: <20240807084829.1037303-3-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240807084829.1037303-1-m.majewski2@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPKsWRmVeSWpSXmKPExsWy7djP87rsppvTDJr72CwezNvGZvF9y3Um izV7zzFZzPssazH/yDlWi/PnN7BbbHp8jdXi8q45bBafe48wWsw4v4/JYt3GW+wWC5ta2C0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nmNx5+TRBmPKLEU ZyQaajEXFScCAKs65BZSAwAA X-CMS-MailID: 20240807084910eucas1p169d15e8209328d18230575a031e0a163 X-Msg-Generator: CA X-RootMTR: 20240807084910eucas1p169d15e8209328d18230575a031e0a163 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240807084910eucas1p169d15e8209328d18230575a031e0a163 References: <20240807084829.1037303-1-m.majewski2@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240807_014917_644863_92773D6E X-CRM114-Status: GOOD ( 15.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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,