summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/clock.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2010-01-11 08:22:23 -0800
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 13:30:09 -0800
commit08aca087f263e8089420b2723fe0c1a0cbe5de0c (patch)
treee63f7d29d5f06e3eb4c1cc29f790b174105b8afb /arch/arm/mach-davinci/clock.c
parente89861e9b44fcd606cdade6230eb0037ad5911bf (diff)
downloadblackbird-obmc-linux-08aca087f263e8089420b2723fe0c1a0cbe5de0c.tar.gz
blackbird-obmc-linux-08aca087f263e8089420b2723fe0c1a0cbe5de0c.zip
davinci: clkdev cleanup: remove clk_lookup wrapper, use clkdev_add_table()
Remove unneeded 'struct davinci_clk' wrapper around 'struct clk_lookup' and use clkdev_add_table() to add the list of clocks in one go. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/clock.c')
-rw-r--r--arch/arm/mach-davinci/clock.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index 0fc63f93a222..bf6218ee94e1 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -427,13 +427,14 @@ int davinci_set_pllrate(struct pll_data *pll, unsigned int prediv,
}
EXPORT_SYMBOL(davinci_set_pllrate);
-int __init davinci_clk_init(struct davinci_clk *clocks)
+int __init davinci_clk_init(struct clk_lookup *clocks)
{
- struct davinci_clk *c;
+ struct clk_lookup *c;
struct clk *clk;
+ size_t num_clocks = 0;
- for (c = clocks; c->lk.clk; c++) {
- clk = c->lk.clk;
+ for (c = clocks; c->clk; c++) {
+ clk = c->clk;
if (!clk->recalc) {
@@ -456,14 +457,16 @@ int __init davinci_clk_init(struct davinci_clk *clocks)
if (clk->lpsc)
clk->flags |= CLK_PSC;
- clkdev_add(&c->lk);
clk_register(clk);
+ num_clocks++;
/* Turn on clocks that Linux doesn't otherwise manage */
if (clk->flags & ALWAYS_ENABLED)
clk_enable(clk);
}
+ clkdev_add_table(clocks, num_clocks);
+
return 0;
}
OpenPOWER on IntegriCloud