diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-03-29 03:55:43 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-03-29 03:55:43 -0400 |
commit | c2a25e819717ea34e8f682d67a3fa76f4893395b (patch) | |
tree | b63912071c9dc3c30d7dc9fb069b570fe0dcd6f0 /drivers/clocksource/sh_tmu.c | |
parent | 620bb636dfb36574b57a89a4c3029237d69bee04 (diff) |
clocksource: Deprecate clock string across the SH drivers.
We want to get rid of the clock string from platform data entirely,
depending on the clkdev-based clock lookup to do the right thing for us
instead.
This converts all of the SH drivers to request their associated function
clocks directly, and if there is no match for that then we fall back on
the legacy lookup while warning about it. After all of the outstanding
CPUs have been converted to clkdev lookups the clock string will be
killed off completely.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/clocksource/sh_tmu.c')
-rw-r--r-- | drivers/clocksource/sh_tmu.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 34239453ebaf..6b62283c1aba 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c | |||
@@ -387,11 +387,15 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) | |||
387 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; | 387 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; |
388 | 388 | ||
389 | /* get hold of clock */ | 389 | /* get hold of clock */ |
390 | p->clk = clk_get(&p->pdev->dev, cfg->clk); | 390 | p->clk = clk_get(&p->pdev->dev, "tmu_fck"); |
391 | if (IS_ERR(p->clk)) { | 391 | if (IS_ERR(p->clk)) { |
392 | dev_err(&p->pdev->dev, "cannot get clock\n"); | 392 | dev_warn(&p->pdev->dev, "using deprecated clock lookup\n"); |
393 | ret = PTR_ERR(p->clk); | 393 | p->clk = clk_get(&p->pdev->dev, cfg->clk); |
394 | goto err1; | 394 | if (IS_ERR(p->clk)) { |
395 | dev_err(&p->pdev->dev, "cannot get clock\n"); | ||
396 | ret = PTR_ERR(p->clk); | ||
397 | goto err1; | ||
398 | } | ||
395 | } | 399 | } |
396 | 400 | ||
397 | return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev), | 401 | return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev), |