mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Krzysztof Kozlowski" <krzk@kernel.org>,
	"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
	"Chanwoo Choi" <cw00.choi@samsung.com>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Michael Turquette" <mturquette@baylibre.com>,
	"Stephen Boyd" <sboyd@kernel.org>,
	"Sam Protsenko" <semen.protsenko@linaro.org>,
	"Peter Griffin" <peter.griffin@linaro.org>,
	"André Draszik" <andre.draszik@linaro.org>,
	"Tudor Ambarus" <tudor.ambarus@linaro.org>
Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH RFC/RFT 02/12] clk: samsung: exynos4412-isp: Use platform_driver_probe() to avoid __refdata
Date: Wed, 05 Mar 2025 22:43:37 +0100	[thread overview]
Message-ID: <20250305-clk-samsung-ref-init-data-v1-2-a4e03a019306@linaro.org> (raw)
In-Reply-To: <20250305-clk-samsung-ref-init-data-v1-0-a4e03a019306@linaro.org>

Switch registering platform driver to platform_driver_probe(), so the
'struct platform_driver' can be properly discarded after init and there
won't be need of __refdata to silence DEBUG_SECTION_MISMATCH.

The change requires using subsys_initcall instead of core_initcall,
because no device drivers would bound in the latter, as required by
platform_driver_probe().

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/clk/samsung/clk-exynos4412-isp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/samsung/clk-exynos4412-isp.c b/drivers/clk/samsung/clk-exynos4412-isp.c
index 29c5644f059379f8a0770ce2214c32b9df7d76e3..f288c152d3f769fbb5123c3b79fe4ddc8c23aa55 100644
--- a/drivers/clk/samsung/clk-exynos4412-isp.c
+++ b/drivers/clk/samsung/clk-exynos4412-isp.c
@@ -155,18 +155,17 @@ static const struct dev_pm_ops exynos4x12_isp_pm_ops = {
 				     pm_runtime_force_resume)
 };
 
-static struct platform_driver exynos4x12_isp_clk_driver __refdata = {
+static struct platform_driver exynos4x12_isp_clk_driver __initdata = {
 	.driver	= {
 		.name = "exynos4x12-isp-clk",
 		.of_match_table = exynos4x12_isp_clk_of_match,
 		.suppress_bind_attrs = true,
 		.pm = &exynos4x12_isp_pm_ops,
 	},
-	.probe = exynos4x12_isp_clk_probe,
 };
 
 static int __init exynos4x12_isp_clk_init(void)
 {
-	return platform_driver_register(&exynos4x12_isp_clk_driver);
+	return platform_driver_probe(&exynos4x12_isp_clk_driver, exynos4x12_isp_clk_probe);
 }
-core_initcall(exynos4x12_isp_clk_init);
+subsys_initcall(exynos4x12_isp_clk_init);

-- 
2.43.0


  parent reply	other threads:[~2025-03-05 21:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 21:43 [PATCH RFC/RFT 00/12] clk: samsung: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 01/12] clk: samsung: exynos2200: " Krzysztof Kozlowski
2025-03-05 21:43 ` Krzysztof Kozlowski [this message]
2025-03-05 21:43 ` [PATCH RFC/RFT 03/12] clk: samsung: exynos5433: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 04/12] clk: samsung: exynos7870: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 05/12] clk: samsung: exynos7885: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 06/12] clk: samsung: exynos850: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 07/12] clk: samsung: exynos8895: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 08/12] clk: samsung: exynos990: " Krzysztof Kozlowski
2025-03-09 13:49   ` Igor Belwon
2025-03-05 21:43 ` [PATCH RFC/RFT 09/12] clk: samsung: exynosautov9: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 10/12] clk: samsung: exynosautov920: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 11/12] clk: samsung: fsd: " Krzysztof Kozlowski
2025-03-05 21:43 ` [PATCH RFC/RFT 12/12] clk: samsung: gs101: " Krzysztof Kozlowski
2025-03-07 14:29 ` [PATCH RFC/RFT 00/12] clk: samsung: " André Draszik
2025-03-07 15:00   ` Krzysztof Kozlowski
2025-03-07 19:04   ` Stephen Boyd

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=20250305-clk-samsung-ref-init-data-v1-2-a4e03a019306@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=alim.akhtar@samsung.com \
    --cc=andre.draszik@linaro.org \
    --cc=cw00.choi@samsung.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=peter.griffin@linaro.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@kernel.org \
    --cc=semen.protsenko@linaro.org \
    --cc=tudor.ambarus@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

all inboxes | Powered by JetHome®