Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191694
b: refs/heads/master
c: 441c244
h: refs/heads/master
v: v3
  • Loading branch information
Magnus Damm authored and Paul Mundt committed May 13, 2010
1 parent aead896 commit 491cb2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67bbabbc8680f53c7b8780d991f655c5cbb88700
refs/heads/master: 441c2440aba2efd8d0f48a5e3357deec92283d62
1 change: 0 additions & 1 deletion trunk/arch/sh/include/asm/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
37 changes: 2 additions & 35 deletions trunk/arch/sh/kernel/cpu/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 491cb2a

Please sign in to comment.