Skip to content

Commit b09d6d9

Browse files
author
Michael Turquette
committed
clk: remove clk-private.h
Private clock framework data structures should be private, surprisingly. Now that all platforms and drivers have been updated to remove static initializations of struct clk and struct clk_core objects and all references to clk-private.h have been removed we can move the definitions of these structures into drivers/clk/clk.c and delete the header. Additionally the ugly DEFINE_CLK macros have been removed. Those were used for static definitions of struct clk objects. That practice is no longer allowed. Finally __clk_init is staticized as it is no longer declared in any header. Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Michael Turquette <[email protected]>
1 parent c87ea8a commit b09d6d9

File tree

2 files changed

+39
-239
lines changed

2 files changed

+39
-239
lines changed

drivers/clk/clk.c

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Standard functionality for the common clock API. See Documentation/clk.txt
1010
*/
1111

12-
#include <linux/clk-private.h>
12+
#include <linux/clk-provider.h>
1313
#include <linux/clk/clk-conf.h>
1414
#include <linux/module.h>
1515
#include <linux/mutex.h>
@@ -46,6 +46,43 @@ static unsigned long clk_core_round_rate_nolock(struct clk_core *clk,
4646
unsigned long rate);
4747
static struct clk_core *clk_core_lookup(const char *name);
4848

49+
/*** private data structures ***/
50+
51+
struct clk_core {
52+
const char *name;
53+
const struct clk_ops *ops;
54+
struct clk_hw *hw;
55+
struct module *owner;
56+
struct clk_core *parent;
57+
const char **parent_names;
58+
struct clk_core **parents;
59+
u8 num_parents;
60+
u8 new_parent_index;
61+
unsigned long rate;
62+
unsigned long new_rate;
63+
struct clk_core *new_parent;
64+
struct clk_core *new_child;
65+
unsigned long flags;
66+
unsigned int enable_count;
67+
unsigned int prepare_count;
68+
unsigned long accuracy;
69+
int phase;
70+
struct hlist_head children;
71+
struct hlist_node child_node;
72+
struct hlist_node debug_node;
73+
unsigned int notifier_count;
74+
#ifdef CONFIG_DEBUG_FS
75+
struct dentry *dentry;
76+
#endif
77+
struct kref ref;
78+
};
79+
80+
struct clk {
81+
struct clk_core *core;
82+
const char *dev_id;
83+
const char *con_id;
84+
};
85+
4986
/*** locking ***/
5087
static void clk_prepare_lock(void)
5188
{
@@ -1995,7 +2032,7 @@ int clk_get_phase(struct clk *clk)
19952032
* Initializes the lists in struct clk_core, queries the hardware for the
19962033
* parent and rate and sets them both.
19972034
*/
1998-
int __clk_init(struct device *dev, struct clk *clk_user)
2035+
static int __clk_init(struct device *dev, struct clk *clk_user)
19992036
{
20002037
int i, ret = 0;
20012038
struct clk_core *orphan;

include/linux/clk-private.h

Lines changed: 0 additions & 237 deletions
This file was deleted.

0 commit comments

Comments
 (0)