[PATCH 1/6] clk: s/clk/core/ for struct clk_core

2015-04-30 Thread Stephen Boyd
While introducing struct clk_core we tried to minimize the diff
by changing the type of 'clk' variables from struct clk to struct
clk_core without changing the names of the variables. Now that
the split is complete, the code is slightly confusing when it
mixes variables called 'clk' and variables called 'core' that are
of the same type struct clk_core. Let's be consistent and use
'core' everywhere we have a struct clk_core pointer and 'clk'
when we have a struct clk pointer.

Cc: Tomeu Vizoso 
Signed-off-by: Stephen Boyd 
---
 drivers/clk/clk.c | 824 +++---
 1 file changed, 412 insertions(+), 412 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 459ce9da13e0..0b3c914db1ca 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -37,11 +37,11 @@ static HLIST_HEAD(clk_root_list);
 static HLIST_HEAD(clk_orphan_list);
 static LIST_HEAD(clk_notifier_list);
 
-static long clk_core_get_accuracy(struct clk_core *clk);
-static unsigned long clk_core_get_rate(struct clk_core *clk);
-static int clk_core_get_phase(struct clk_core *clk);
-static bool clk_core_is_prepared(struct clk_core *clk);
-static bool clk_core_is_enabled(struct clk_core *clk);
+static long clk_core_get_accuracy(struct clk_core *core);
+static unsigned long clk_core_get_rate(struct clk_core *core);
+static int clk_core_get_phase(struct clk_core *core);
+static bool clk_core_is_prepared(struct clk_core *core);
+static bool clk_core_is_enabled(struct clk_core *core);
 static struct clk_core *clk_core_lookup(const char *name);
 
 /***private data structures***/
@@ -293,59 +293,59 @@ static const struct file_operations clk_dump_fops = {
.release= single_release,
 };
 
-static int clk_debug_create_one(struct clk_core *clk, struct dentry *pdentry)
+static int clk_debug_create_one(struct clk_core *core, struct dentry *pdentry)
 {
struct dentry *d;
int ret = -ENOMEM;
 
-   if (!clk || !pdentry) {
+   if (!core || !pdentry) {
ret = -EINVAL;
goto out;
}
 
-   d = debugfs_create_dir(clk->name, pdentry);
+   d = debugfs_create_dir(core->name, pdentry);
if (!d)
goto out;
 
-   clk->dentry = d;
+   core->dentry = d;
 
-   d = debugfs_create_u32("clk_rate", S_IRUGO, clk->dentry,
-   (u32 *)>rate);
+   d = debugfs_create_u32("clk_rate", S_IRUGO, core->dentry,
+   (u32 *)>rate);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32("clk_accuracy", S_IRUGO, clk->dentry,
-   (u32 *)>accuracy);
+   d = debugfs_create_u32("clk_accuracy", S_IRUGO, core->dentry,
+   (u32 *)>accuracy);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32("clk_phase", S_IRUGO, clk->dentry,
-   (u32 *)>phase);
+   d = debugfs_create_u32("clk_phase", S_IRUGO, core->dentry,
+   (u32 *)>phase);
if (!d)
goto err_out;
 
-   d = debugfs_create_x32("clk_flags", S_IRUGO, clk->dentry,
-   (u32 *)>flags);
+   d = debugfs_create_x32("clk_flags", S_IRUGO, core->dentry,
+   (u32 *)>flags);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32("clk_prepare_count", S_IRUGO, clk->dentry,
-   (u32 *)>prepare_count);
+   d = debugfs_create_u32("clk_prepare_count", S_IRUGO, core->dentry,
+   (u32 *)>prepare_count);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32("clk_enable_count", S_IRUGO, clk->dentry,
-   (u32 *)>enable_count);
+   d = debugfs_create_u32("clk_enable_count", S_IRUGO, core->dentry,
+   (u32 *)>enable_count);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32("clk_notifier_count", S_IRUGO, clk->dentry,
-   (u32 *)>notifier_count);
+   d = debugfs_create_u32("clk_notifier_count", S_IRUGO, core->dentry,
+   (u32 *)>notifier_count);
if (!d)
goto err_out;
 
-   if (clk->ops->debug_init) {
-   ret = clk->ops->debug_init(clk->hw, clk->dentry);
+   if (core->ops->debug_init) {
+   ret = core->ops->debug_init(core->hw, core->dentry);
if (ret)
goto err_out;
}
@@ -354,31 +354,31 @@ static int clk_debug_create_one(struct clk_core *clk, 
struct dentry *pdentry)
goto out;
 
 err_out:
-   debugfs_remove_recursive(clk->dentry);
-   clk->dentry = NULL;
+   debugfs_remove_recursive(core->dentry);
+   core->dentry = NULL;
 out:
return ret;
 }
 
 /**
  * clk_debug_register - add a clk node to the debugfs clk tree
- * @clk: the clk being added to the debugfs clk tree
+ * @core: the clk being added to the debugfs clk 

[PATCH 1/6] clk: s/clk/core/ for struct clk_core

2015-04-30 Thread Stephen Boyd
While introducing struct clk_core we tried to minimize the diff
by changing the type of 'clk' variables from struct clk to struct
clk_core without changing the names of the variables. Now that
the split is complete, the code is slightly confusing when it
mixes variables called 'clk' and variables called 'core' that are
of the same type struct clk_core. Let's be consistent and use
'core' everywhere we have a struct clk_core pointer and 'clk'
when we have a struct clk pointer.

Cc: Tomeu Vizoso tomeu.viz...@collabora.com
Signed-off-by: Stephen Boyd sb...@codeaurora.org
---
 drivers/clk/clk.c | 824 +++---
 1 file changed, 412 insertions(+), 412 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 459ce9da13e0..0b3c914db1ca 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -37,11 +37,11 @@ static HLIST_HEAD(clk_root_list);
 static HLIST_HEAD(clk_orphan_list);
 static LIST_HEAD(clk_notifier_list);
 
-static long clk_core_get_accuracy(struct clk_core *clk);
-static unsigned long clk_core_get_rate(struct clk_core *clk);
-static int clk_core_get_phase(struct clk_core *clk);
-static bool clk_core_is_prepared(struct clk_core *clk);
-static bool clk_core_is_enabled(struct clk_core *clk);
+static long clk_core_get_accuracy(struct clk_core *core);
+static unsigned long clk_core_get_rate(struct clk_core *core);
+static int clk_core_get_phase(struct clk_core *core);
+static bool clk_core_is_prepared(struct clk_core *core);
+static bool clk_core_is_enabled(struct clk_core *core);
 static struct clk_core *clk_core_lookup(const char *name);
 
 /***private data structures***/
@@ -293,59 +293,59 @@ static const struct file_operations clk_dump_fops = {
.release= single_release,
 };
 
-static int clk_debug_create_one(struct clk_core *clk, struct dentry *pdentry)
+static int clk_debug_create_one(struct clk_core *core, struct dentry *pdentry)
 {
struct dentry *d;
int ret = -ENOMEM;
 
-   if (!clk || !pdentry) {
+   if (!core || !pdentry) {
ret = -EINVAL;
goto out;
}
 
-   d = debugfs_create_dir(clk-name, pdentry);
+   d = debugfs_create_dir(core-name, pdentry);
if (!d)
goto out;
 
-   clk-dentry = d;
+   core-dentry = d;
 
-   d = debugfs_create_u32(clk_rate, S_IRUGO, clk-dentry,
-   (u32 *)clk-rate);
+   d = debugfs_create_u32(clk_rate, S_IRUGO, core-dentry,
+   (u32 *)core-rate);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32(clk_accuracy, S_IRUGO, clk-dentry,
-   (u32 *)clk-accuracy);
+   d = debugfs_create_u32(clk_accuracy, S_IRUGO, core-dentry,
+   (u32 *)core-accuracy);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32(clk_phase, S_IRUGO, clk-dentry,
-   (u32 *)clk-phase);
+   d = debugfs_create_u32(clk_phase, S_IRUGO, core-dentry,
+   (u32 *)core-phase);
if (!d)
goto err_out;
 
-   d = debugfs_create_x32(clk_flags, S_IRUGO, clk-dentry,
-   (u32 *)clk-flags);
+   d = debugfs_create_x32(clk_flags, S_IRUGO, core-dentry,
+   (u32 *)core-flags);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32(clk_prepare_count, S_IRUGO, clk-dentry,
-   (u32 *)clk-prepare_count);
+   d = debugfs_create_u32(clk_prepare_count, S_IRUGO, core-dentry,
+   (u32 *)core-prepare_count);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32(clk_enable_count, S_IRUGO, clk-dentry,
-   (u32 *)clk-enable_count);
+   d = debugfs_create_u32(clk_enable_count, S_IRUGO, core-dentry,
+   (u32 *)core-enable_count);
if (!d)
goto err_out;
 
-   d = debugfs_create_u32(clk_notifier_count, S_IRUGO, clk-dentry,
-   (u32 *)clk-notifier_count);
+   d = debugfs_create_u32(clk_notifier_count, S_IRUGO, core-dentry,
+   (u32 *)core-notifier_count);
if (!d)
goto err_out;
 
-   if (clk-ops-debug_init) {
-   ret = clk-ops-debug_init(clk-hw, clk-dentry);
+   if (core-ops-debug_init) {
+   ret = core-ops-debug_init(core-hw, core-dentry);
if (ret)
goto err_out;
}
@@ -354,31 +354,31 @@ static int clk_debug_create_one(struct clk_core *clk, 
struct dentry *pdentry)
goto out;
 
 err_out:
-   debugfs_remove_recursive(clk-dentry);
-   clk-dentry = NULL;
+   debugfs_remove_recursive(core-dentry);
+   core-dentry = NULL;
 out:
return ret;
 }
 
 /**
  * clk_debug_register - add a clk node to the debugfs clk tree
- * @clk: the clk being added to the debugfs clk tree
+ * @core: the clk