summaryrefslogtreecommitdiff
path: root/arch/sh
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-05-11 09:37:12 (GMT)
committerPaul Mundt <lethal@linux-sh.org>2010-05-13 08:38:16 (GMT)
commit441c2440aba2efd8d0f48a5e3357deec92283d62 (patch)
treec5e4b5551125118c482c0c8da828808412c778d9 /arch/sh
parent67bbabbc8680f53c7b8780d991f655c5cbb88700 (diff)
downloadlinux-fsl-qoriq-441c2440aba2efd8d0f48a5e3357deec92283d62.tar.xz
sh: remove unused clock lookup
Now when all clocks are registered using clkdev, get rid of the special SH-specific clock lookup. Also ditch the unused module ref counting code. This patch syncs the SH behaviour with ARM. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/include/asm/clock.h1
-rw-r--r--arch/sh/kernel/cpu/clock.c37
2 files changed, 2 insertions, 36 deletions
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h
index f6b0bfd..35d2196 100644
--- a/arch/sh/include/asm/clock.h
+++ b/arch/sh/include/asm/clock.h
@@ -23,7 +23,6 @@ struct clk {
struct list_head node;
const char *name;
int id;
- struct module *owner;
struct clk *parent;
struct clk_ops *ops;
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c
index a725c7f..8cc6935 100644
--- a/arch/sh/kernel/cpu/clock.c
+++ b/arch/sh/kernel/cpu/clock.c
@@ -398,49 +398,16 @@ EXPORT_SYMBOL_GPL(clk_round_rate);
* Returns a clock. Note that we first try to use device id on the bus
* and clock name. If this fails, we try to use clock name only.
*/
-struct clk *clk_get(struct device *dev, const char *id)
+struct clk *clk_get(struct device *dev, const char *con_id)
{
const char *dev_id = dev ? dev_name(dev) : NULL;
- struct clk *p, *clk = ERR_PTR(-ENOENT);
- int idno;
- clk = clk_get_sys(dev_id, id);
- if (clk && !IS_ERR(clk))
- return clk;
-
- if (dev == NULL || dev->bus != &platform_bus_type)
- idno = -1;
- else
- idno = to_platform_device(dev)->id;
-
- mutex_lock(&clock_list_sem);
- list_for_each_entry(p, &clock_list, node) {
- if (p->name && p->id == idno &&
- strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
- clk = p;
- goto found;
- }
- }
-
- list_for_each_entry(p, &clock_list, node) {
- if (p->name &&
- strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
- clk = p;
- break;
- }
- }
-
-found:
- mutex_unlock(&clock_list_sem);
-
- return clk;
+ return clk_get_sys(dev_id, con_id);
}
EXPORT_SYMBOL_GPL(clk_get);
void clk_put(struct clk *clk)
{
- if (clk && !IS_ERR(clk))
- module_put(clk->owner);
}
EXPORT_SYMBOL_GPL(clk_put);