]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: sunxi-ng: Prevent unbinding CCUs via sysfs
authorSamuel Holland <samuel@sholland.org>
Wed, 1 Sep 2021 05:05:20 +0000 (00:05 -0500)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 13 Sep 2021 07:03:20 +0000 (09:03 +0200)
The CCU drivers are not really designed to be unbound. Unbinding a SoC's
main CCU is especially pointless, as very few of the peripherals on the
SoC will work without it. Let's avoid any potential problems by removing
the bind/unbind attributes from sysfs for these drivers.

This change is not applied to the "secondary" CCUs (DE, USB) as those
could reasonably be unbound without making the system useless.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20210901050526.45673-3-samuel@sholland.org
drivers/clk/sunxi-ng/ccu-sun50i-a100-r.c
drivers/clk/sunxi-ng/ccu-sun50i-a100.c
drivers/clk/sunxi-ng/ccu-sun50i-a64.c
drivers/clk/sunxi-ng/ccu-sun50i-h6.c
drivers/clk/sunxi-ng/ccu-sun8i-a83t.c
drivers/clk/sunxi-ng/ccu-sun8i-r40.c
drivers/clk/sunxi-ng/ccu-sun9i-a80-de.c
drivers/clk/sunxi-ng/ccu-sun9i-a80.c

index 6f2a589705561007490372040d8d5c0ab7521ca8..804729e0a20895e0366f565600fce0c2532032c1 100644 (file)
@@ -208,6 +208,7 @@ static struct platform_driver sun50i_a100_r_ccu_driver = {
        .probe  = sun50i_a100_r_ccu_probe,
        .driver = {
                .name   = "sun50i-a100-r-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun50i_a100_r_ccu_ids,
        },
 };
index 913bb08e6dee8bff50234bc812b29e640a801547..1d475d5a3d91244534625aa5165421989e2e3515 100644 (file)
@@ -1270,6 +1270,7 @@ static struct platform_driver sun50i_a100_ccu_driver = {
        .probe  = sun50i_a100_ccu_probe,
        .driver = {
                .name   = "sun50i-a100-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun50i_a100_ccu_ids,
        },
 };
index 54f25c624f020baf6ab68bf61270e61c4b6232ca..fcbd914e84e0bf08be1cdc5ac3f49d4a74734c7a 100644 (file)
@@ -978,6 +978,7 @@ static struct platform_driver sun50i_a64_ccu_driver = {
        .probe  = sun50i_a64_ccu_probe,
        .driver = {
                .name   = "sun50i-a64-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun50i_a64_ccu_ids,
        },
 };
index c0800da2fa3d70bb0fca2298df1ca84948605e83..9a8902f702c508e53d810fec2a8ac979f2198cee 100644 (file)
@@ -1252,6 +1252,7 @@ static struct platform_driver sun50i_h6_ccu_driver = {
        .probe  = sun50i_h6_ccu_probe,
        .driver = {
                .name   = "sun50i-h6-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun50i_h6_ccu_ids,
        },
 };
index c2ddcd2ddab4ec977d453a0500b18c3e1b2b2c56..e663ab0c9935c7fcdb21494350295a5be6d2352d 100644 (file)
@@ -918,6 +918,7 @@ static struct platform_driver sun8i_a83t_ccu_driver = {
        .probe  = sun8i_a83t_ccu_probe,
        .driver = {
                .name   = "sun8i-a83t-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun8i_a83t_ccu_ids,
        },
 };
index 002e0c3a04dbeab502272b2190a578dd5a89eb1f..a2144ee728a034061a488717ba99b45c2acd08d7 100644 (file)
@@ -1369,6 +1369,7 @@ static struct platform_driver sun8i_r40_ccu_driver = {
        .probe  = sun8i_r40_ccu_probe,
        .driver = {
                .name   = "sun8i-r40-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun8i_r40_ccu_ids,
        },
 };
index 261e64416f26a8d33e41567e6bfc1b48b6e315d6..d2072972b614088c57590add4e7245848681241c 100644 (file)
@@ -268,6 +268,7 @@ static struct platform_driver sun9i_a80_de_clk_driver = {
        .probe  = sun9i_a80_de_clk_probe,
        .driver = {
                .name   = "sun9i-a80-de-clks",
+               .suppress_bind_attrs = true,
                .of_match_table = sun9i_a80_de_clk_ids,
        },
 };
index 97aaed0e685000005d9002bbb08f97d18ccfdcfd..68b30fdc60fd4387457df23f216d90fe429c52f9 100644 (file)
@@ -1243,6 +1243,7 @@ static struct platform_driver sun9i_a80_ccu_driver = {
        .probe  = sun9i_a80_ccu_probe,
        .driver = {
                .name   = "sun9i-a80-ccu",
+               .suppress_bind_attrs = true,
                .of_match_table = sun9i_a80_ccu_ids,
        },
 };