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: 815221 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 1D66E17994D for ; Fri, 26 Jul 2024 11:01:45 +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=1721991707; cv=none; b=lT9yruVPltVBzuTgZtAtWf0w42iQXhJyz7VNZz4LnO4q+bX/M5aBZraXrOTrbR4gUu1C5ljnUGF+zGCkznXFwn82AmKzd7AFhTPzEbaldtoSmPwPdo2L5tKwG31aQuSQtZ0/JndrIuDssLLOoGQf4Fmke7VYylIACD40pkiy10U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721991707; c=relaxed/simple; bh=6+x2NU+bO6SYQfy5ttoPIJJ+saijMgx572Nw18DrXkU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:MIME-Version: Content-Type:References; b=TgJ7i2yfejQ9qF13HQnB7X02N45aSFSbXKDErv2PqTmPMvq2kQqWY4yziaJfoKHrtHJOX5zWeQ+O+LSAE8HnnRYbo7dMrrVOeNukp5gvq4LVKLtA2XAWBWkY5599W8zO7zhJwNLG173CQ8xjmn8vltgDfUwvjobKv+HRYmrGtr0= 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=RQpO+Bpl; 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="RQpO+Bpl" Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20240726110137euoutp02a29a6a44b8a13f7aa5be496e80bafe37~lvlNkZLMx0260202602euoutp02U for ; Fri, 26 Jul 2024 11:01:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20240726110137euoutp02a29a6a44b8a13f7aa5be496e80bafe37~lvlNkZLMx0260202602euoutp02U 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> 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+NgFrrAKsWRmVeSWpSXmKPExsWy7djPc7qCTYvTDFqOi1g8mLeNzeL7lutM Fmv2nmOymPdZ1mL+kXOsFufPb2C32PT4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/06iw8rQipyFCi0L418c5vimZbfebhJ7CZcE63yGS8+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> Slightly simpler and nothing is lost if _suspend and _resume functions are built unconditionally. Suggested-by: Anand Moon 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,