aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/clock.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2010-01-11 11:22:23 -0500
committerKevin Hilman <khilman@deeprootsystems.com>2010-02-04 16:30:09 -0500
commit08aca087f263e8089420b2723fe0c1a0cbe5de0c (patch)
treee63f7d29d5f06e3eb4c1cc29f790b174105b8afb /arch/arm/mach-davinci/clock.c
parente89861e9b44fcd606cdade6230eb0037ad5911bf (diff)
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,
427} 427}
428EXPORT_SYMBOL(davinci_set_pllrate); 428EXPORT_SYMBOL(davinci_set_pllrate);
429 429
430int __init davinci_clk_init(struct davinci_clk *clocks) 430int __init davinci_clk_init(struct clk_lookup *clocks)
431 { 431 {
432 struct davinci_clk *c; 432 struct clk_lookup *c;
433 struct clk *clk; 433 struct clk *clk;
434 size_t num_clocks = 0;
434 435
435 for (c = clocks; c->lk.clk; c++) { 436 for (c = clocks; c->clk; c++) {
436 clk = c->lk.clk; 437 clk = c->clk;
437 438
438 if (!clk->recalc) { 439 if (!clk->recalc) {
439 440
@@ -456,14 +457,16 @@ int __init davinci_clk_init(struct davinci_clk *clocks)
456 if (clk->lpsc) 457 if (clk->lpsc)
457 clk->flags |= CLK_PSC; 458 clk->flags |= CLK_PSC;
458 459
459 clkdev_add(&c->lk);
460 clk_register(clk); 460 clk_register(clk);
461 num_clocks++;
461 462
462 /* Turn on clocks that Linux doesn't otherwise manage */ 463 /* Turn on clocks that Linux doesn't otherwise manage */
463 if (clk->flags & ALWAYS_ENABLED) 464 if (clk->flags & ALWAYS_ENABLED)
464 clk_enable(clk); 465 clk_enable(clk);
465 } 466 }
466 467
468 clkdev_add_table(clocks, num_clocks);
469
467 return 0; 470 return 0;
468} 471}
469 472