diff mbox series

[1/2] Revert "clk: rockchip: use module_platform_driver_probe"

Message ID 20211027132616.1039814-2-heiko@sntech.de (mailing list archive)
State Accepted, archived
Headers show
Series clk: rockchip: cleanup errors in (module-)driver handling | expand

Commit Message

Heiko Stuebner Oct. 27, 2021, 1:26 p.m. UTC
This reverts commit 1da80da028fe5accb866c0d6899a292ed86bef45.

Reading recent discussions [0] [1], I realized this change introduces
a number of problems:

- only converting to module_platform_driver creates the issue
  with the existing __init and __initdata attributes.

  When the driver would've been built as a module, all the missing
  clock-definitions (all are initdata) should've turned up as error
  in testing suggesting that the change wasn't at all

- a clock driver is a very core component of soc bringup and making
  this able to be built as a module solely for enabling the soc vendor
  to add out of tree changes for Android implementations is not in our
  interest and also everything except a ramdisk won't probe without a
  clock controller.

  This is especially true when the changes aren't really tested and
  are merely added to move the mainline driver "out of the way".

[0] https://lwn.net/Articles/872209/
[1] https://lore.kernel.org/all/163529604399.15791.378104318036812951@swboyd.mtv.corp.google.com/

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 drivers/clk/rockchip/clk-rk3399.c | 2 +-
 drivers/clk/rockchip/clk-rk3568.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Stephen Boyd Oct. 29, 2021, 6:42 a.m. UTC | #1
Quoting Heiko Stuebner (2021-10-27 06:26:15)
> This reverts commit 1da80da028fe5accb866c0d6899a292ed86bef45.
> 
> Reading recent discussions [0] [1], I realized this change introduces
> a number of problems:
> 
> - only converting to module_platform_driver creates the issue
>   with the existing __init and __initdata attributes.
> 
>   When the driver would've been built as a module, all the missing
>   clock-definitions (all are initdata) should've turned up as error
>   in testing suggesting that the change wasn't at all
> 
> - a clock driver is a very core component of soc bringup and making
>   this able to be built as a module solely for enabling the soc vendor
>   to add out of tree changes for Android implementations is not in our
>   interest and also everything except a ramdisk won't probe without a
>   clock controller.
> 
>   This is especially true when the changes aren't really tested and
>   are merely added to move the mainline driver "out of the way".
> 
> [0] https://lwn.net/Articles/872209/
> [1] https://lore.kernel.org/all/163529604399.15791.378104318036812951@swboyd.mtv.corp.google.com/
> 
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>
diff mbox series

Patch

diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers/clk/rockchip/clk-rk3399.c
index 7924598747b6..53ed5cca335b 100644
--- a/drivers/clk/rockchip/clk-rk3399.c
+++ b/drivers/clk/rockchip/clk-rk3399.c
@@ -1656,7 +1656,7 @@  static struct platform_driver clk_rk3399_driver = {
 		.suppress_bind_attrs = true,
 	},
 };
-module_platform_driver_probe(clk_rk3399_driver, clk_rk3399_probe);
+builtin_platform_driver_probe(clk_rk3399_driver, clk_rk3399_probe);
 
 MODULE_DESCRIPTION("Rockchip RK3399 Clock Driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/clk/rockchip/clk-rk3568.c b/drivers/clk/rockchip/clk-rk3568.c
index 939e7079c334..75ca855e720d 100644
--- a/drivers/clk/rockchip/clk-rk3568.c
+++ b/drivers/clk/rockchip/clk-rk3568.c
@@ -1719,7 +1719,7 @@  static struct platform_driver clk_rk3568_driver = {
 		.suppress_bind_attrs = true,
 	},
 };
-module_platform_driver_probe(clk_rk3568_driver, clk_rk3568_probe);
+builtin_platform_driver_probe(clk_rk3568_driver, clk_rk3568_probe);
 
 MODULE_DESCRIPTION("Rockchip RK3568 Clock Driver");
 MODULE_LICENSE("GPL");