From patchwork Fri Jul 26 11:01:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mateusz Majewski X-Patchwork-Id: 13742592 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 A9946C3DA7F for ; Fri, 26 Jul 2024 11:03:02 +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=0BeiRE0Ve1CHw9X9pRqdMFWHo53wdnWTEwVCP12z2WY=; b=wI4hM2sGxHLZOBDtGBcOnYcsgK E26DB6sAW3NEGOO6pnSvyWNXGy9SvzCjl3Ms6uyB8l9yu7D29kYO7jZB4vEml/uRAO1QiI1AlGp9g BgHRa0n38ipOKLgFzQa/pV4i1/9OZZ+/Y1QlUoaZ+qLXBDYqOHlQchSNpabG0wAR4KeoGIzpJ4X7D uaVP8AjbgYKtnEQhZO1hl6q/IC6dMPJaTMs2LJXc5odh7xW0LjXKls512S2HvPzWKzk/For79nDJm IifTflsSAU2jpEkzjlLM6hEVVHJUW8i7paE3dTTaiYwXlpBmsXRLL5S4Igb2xov3pZYpKIOjinTE9 ezP0dCGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sXIio-00000003cwI-1cDV; Fri, 26 Jul 2024 11:02:50 +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 1sXIhh-00000003ccN-1Enu for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2024 11:01:43 +0000 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20240726110137euoutp01d2b75667eb40a18d0ce8947d88c00350~lvlNkOpc83068830688euoutp01g for ; Fri, 26 Jul 2024 11:01:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20240726110137euoutp01d2b75667eb40a18d0ce8947d88c00350~lvlNkOpc83068830688euoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1721991697; bh=0BeiRE0Ve1CHw9X9pRqdMFWHo53wdnWTEwVCP12z2WY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RQpO+BplCEPdPNcJIP/+0Gau5v/Fihmq0RmwLl/oDRjgbFzHQ/K8YH3GSVlYiwQhQ ba2UmSSjPwWzduYD7tbdQShyJCGl7g4NJpnmRWCLfrFYv3zAjttlJiXZEwrZqeN4Fi QimxMoBJbzu0t6txo3grOkn2+hS0cqjdowur27Bs= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20240726110137eucas1p1652a14a57090c22eca8fac649b09c57e~lvlNNESh01887818878eucas1p15; Fri, 26 Jul 2024 11:01:37 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id B6.FB.09624.11283A66; Fri, 26 Jul 2024 12:01:37 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20240726110136eucas1p2c100992bb710acb5a12bb294401d4aeb~lvlMr-E8a2810128101eucas1p2_; Fri, 26 Jul 2024 11:01:36 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20240726110136eusmtrp2bc7ffc6e6474d8bb970f41fb4e1451f7~lvlMrOXnB1722517225eusmtrp2R; Fri, 26 Jul 2024 11:01:36 +0000 (GMT) X-AuditID: cbfec7f2-bfbff70000002598-e7-66a382119a17 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id C7.B1.09010.01283A66; Fri, 26 Jul 2024 12:01:36 +0100 (BST) Received: from AMDC4515.eu.corp.samsungelectronics.net (unknown [106.120.51.28]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20240726110135eusmtip2e50f4a82cc50608f178a006e78792e12~lvlLvW_zQ2467724677eusmtip2L; Fri, 26 Jul 2024 11:01:35 +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 v2 2/6] drivers/thermal/exynos: use pm_sleep_ptr instead of conditional compilation Date: Fri, 26 Jul 2024 13:01:06 +0200 Message-ID: <20240726110114.1509733-3-m.majewski2@samsung.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240726110114.1509733-1-m.majewski2@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAKsWRmVeSWpSXmKPExsWy7djPc7qCTYvTDFqOi1g8mLeNzeL7lutM Fmv2nmOymPdZ1mL+kXOsFufPb2C32PT4GqvF5V1z2Cw+9x5htJhx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bfebhJ7CZcE63yGS8+d21X+8R1Q YinOSDTUYi4qTgQAoW1ef1IDAAA= X-CMS-MailID: 20240726110136eucas1p2c100992bb710acb5a12bb294401d4aeb X-Msg-Generator: CA X-RootMTR: 20240726110136eucas1p2c100992bb710acb5a12bb294401d4aeb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20240726110136eucas1p2c100992bb710acb5a12bb294401d4aeb References: <20240726110114.1509733-1-m.majewski2@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240726_040141_618979_196C8812 X-CRM114-Status: GOOD ( 15.53 ) 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 Signed-off-by: Mateusz Majewski Reviewed-by: Sam Protsenko --- 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,