Skip to content

Commit

Permalink
clk: core: add __init decoration for CLK_OF_DECLARE_DRIVER function
Browse files Browse the repository at this point in the history
The new introduced macro CLK_OF_DECLARE_DRIVER is usually used to
declare clock driver init functions, which are mostly decorated with
__init.  Add __init decoration for CLK_OF_DECLARE_DRIVER function to
avoid causing section mismatch warnings on client clock drivers.

Signed-off-by: Shawn Guo <[email protected]>
Fixes: c7296c5 ("clk: core: New macro CLK_OF_DECLARE_DRIVER")
Signed-off-by: Stephen Boyd <[email protected]>
  • Loading branch information
shawnguo2 authored and bebarino committed Oct 17, 2016
1 parent 234d511 commit 339e1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/clk-provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ extern struct of_device_id __clk_of_table;
* routines, one at of_clk_init(), and one at platform device probe
*/
#define CLK_OF_DECLARE_DRIVER(name, compat, fn) \
static void name##_of_clk_init_driver(struct device_node *np) \
static void __init name##_of_clk_init_driver(struct device_node *np) \
{ \
of_node_clear_flag(np, OF_POPULATED); \
fn(np); \
Expand Down

0 comments on commit 339e1e5

Please sign in to comment.