Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184818
b: refs/heads/master
c: 74be842
h: refs/heads/master
v: v3
  • Loading branch information
Paul Walmsley committed Feb 24, 2010
1 parent 4e069a5 commit 80c9a43
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8d373779e17b3d108b49019fc83102fdd1523e1
refs/heads/master: 74be8427431b4bbff4a6506f64fb30bb61e781a7
27 changes: 27 additions & 0 deletions trunk/arch/arm/plat-omap/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,33 @@ void clk_enable_init_clocks(void)
}
}

/**
* omap_clk_get_by_name - locate OMAP struct clk by its name
* @name: name of the struct clk to locate
*
* Locate an OMAP struct clk by its name. Assumes that struct clk
* names are unique. Returns NULL if not found or a pointer to the
* struct clk if found.
*/
struct clk *omap_clk_get_by_name(const char *name)
{
struct clk *c;
struct clk *ret = NULL;

mutex_lock(&clocks_mutex);

list_for_each_entry(c, &clocks, node) {
if (!strcmp(c->name, name)) {
ret = c;
break;
}
}

mutex_unlock(&clocks_mutex);

return ret;
}

/*
* Low level helpers
*/
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/plat-omap/include/plat/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ unsigned long omap_fixed_divisor_recalc(struct clk *clk);
extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
#endif
extern struct clk *omap_clk_get_by_name(const char *name);

extern const struct clkops clkops_null;

Expand Down

0 comments on commit 80c9a43

Please sign in to comment.