clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
[linux-2.6-microblaze.git] / include / linux / clk-provider.h
index 842e72a..c9f5276 100644 (file)
@@ -1363,7 +1363,13 @@ struct clk_hw_onecell_data {
        struct clk_hw *hws[];
 };
 
-#define CLK_OF_DECLARE(name, compat, fn) OF_DECLARE_1(clk, name, compat, fn)
+#define CLK_OF_DECLARE(name, compat, fn) \
+       static void __init name##_of_clk_init_declare(struct device_node *np) \
+       {                                                               \
+               fn(np);                                                 \
+               fwnode_dev_initialized(of_fwnode_handle(np), true);     \
+       }                                                               \
+       OF_DECLARE_1(clk, name, compat, name##_of_clk_init_declare)
 
 /*
  * Use this macro when you have a driver that requires two initialization