Skip to content

Commit

Permalink
ARM: shmobile: remove sh_timer_config clk member
Browse files Browse the repository at this point in the history
Now when the SH-Mobile ARM platforms have been converted
to use device name it is possible to remove "clk" from
struct sh_timer_config.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 31, 2010
1 parent 3985c7c commit 03ff858
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 22 deletions.
10 changes: 3 additions & 7 deletions drivers/clocksource/sh_cmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,9 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
/* get hold of clock */
p->clk = clk_get(&p->pdev->dev, "cmt_fck");
if (IS_ERR(p->clk)) {
dev_warn(&p->pdev->dev, "using deprecated clock lookup\n");
p->clk = clk_get(&p->pdev->dev, cfg->clk);
if (IS_ERR(p->clk)) {
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}

if (resource_size(res) == 6) {
Expand Down
10 changes: 3 additions & 7 deletions drivers/clocksource/sh_mtu2.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,9 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
/* get hold of clock */
p->clk = clk_get(&p->pdev->dev, "mtu2_fck");
if (IS_ERR(p->clk)) {
dev_warn(&p->pdev->dev, "using deprecated clock lookup\n");
p->clk = clk_get(&p->pdev->dev, cfg->clk);
if (IS_ERR(p->clk)) {
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}

return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
Expand Down
10 changes: 3 additions & 7 deletions drivers/clocksource/sh_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,13 +393,9 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
/* get hold of clock */
p->clk = clk_get(&p->pdev->dev, "tmu_fck");
if (IS_ERR(p->clk)) {
dev_warn(&p->pdev->dev, "using deprecated clock lookup\n");
p->clk = clk_get(&p->pdev->dev, cfg->clk);
if (IS_ERR(p->clk)) {
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}
dev_err(&p->pdev->dev, "cannot get clock\n");
ret = PTR_ERR(p->clk);
goto err1;
}

return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
Expand Down
1 change: 0 additions & 1 deletion include/linux/sh_timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ struct sh_timer_config {
char *name;
long channel_offset;
int timer_bit;
char *clk;
unsigned long clockevent_rating;
unsigned long clocksource_rating;
};
Expand Down

0 comments on commit 03ff858

Please sign in to comment.