clk: renesas: mstp: Remove obsolete clkdev registration
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 22 Jan 2024 13:49:45 +0000 (14:49 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 23 Jan 2024 20:23:47 +0000 (21:23 +0100)
After the DT conversion of SH-Mobile and Armadillo-800-EVA display
support, all devices are registered from DT, so we can remove the
registration of clkdevs.

Add the missing #include <linux/slab.h>, which was included implicitly
through <linux/clkdev.h> before.

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/e98a6e47ebecc44fa41de6d88b4ed20c6efbd177.1705931322.git.geert+renesas@glider.be
drivers/clk/renesas/clk-mstp.c

index 6280f4dfed714e6914dea8bc5dd63b55ee3432b8..5304c977562fc6850ba8046ea8c027eaa5ff55ef 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/clk.h>
 #include <linux/clk-provider.h>
-#include <linux/clkdev.h>
 #include <linux/clk/renesas.h>
 #include <linux/device.h>
 #include <linux/io.h>
@@ -19,6 +18,7 @@
 #include <linux/of_address.h>
 #include <linux/pm_clock.h>
 #include <linux/pm_domain.h>
+#include <linux/slab.h>
 #include <linux/spinlock.h>
 
 /*
@@ -237,22 +237,12 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
 
                clks[clkidx] = cpg_mstp_clock_register(name, parent_name,
                                                       clkidx, group);
-               if (!IS_ERR(clks[clkidx])) {
+               if (!IS_ERR(clks[clkidx]))
                        group->data.clk_num = max(group->data.clk_num,
                                                  clkidx + 1);
-                       /*
-                        * Register a clkdev to let board code retrieve the
-                        * clock by name and register aliases for non-DT
-                        * devices.
-                        *
-                        * FIXME: Remove this when all devices that require a
-                        * clock will be instantiated from DT.
-                        */
-                       clk_register_clkdev(clks[clkidx], name, NULL);
-               } else {
+               else
                        pr_err("%s: failed to register %pOFn %s clock (%ld)\n",
                               __func__, np, name, PTR_ERR(clks[clkidx]));
-               }
        }
 
        of_clk_add_provider(np, of_clk_src_onecell_get, &group->data);