Skip to contentSkip to conversation

ARM: shmobile: remove sh_timer_config clk member

PATCH In review Magnus Damm 2 participants 2 messages Oct 13, 2010 – Oct 31, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: shmobile: remove sh_timer_config clk member

From: Magnus Damm <[email protected]>

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.

---

Applies on top of the following outstanding CMT patches:
"[PATCH] clocksource: sh_cmt: One-off clockevent fix V2" "[PATCH] clocksource: sh_cmt: Rate calculation fix"

 drivers/clocksource/sh_cmt.c  |   10 +++-------
 drivers/clocksource/sh_mtu2.c |   10 +++-------
 drivers/clocksource/sh_tmu.c  |   10 +++-------
 include/linux/sh_timer.h      |    1 -
 4 files changed, 9 insertions(+), 22 deletions(-)
drivers/clocksource/sh_cmt.c +3 -7
@@ -616,13 +616,9 @@ static int sh_cmt_setup(struct sh_cmt_pr
 	/* 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) {
drivers/clocksource/sh_mtu2.c +3 -7
@@ -287,13 +287,9 @@ static int sh_mtu2_setup(struct sh_mtu2_
 	/* 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),
drivers/clocksource/sh_tmu.c +3 -7
@@ -393,13 +393,9 @@ static int sh_tmu_setup(struct sh_tmu_pr
 	/* 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),
include/linux/sh_timer.h +0 -1
@@ -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;
 };
#1 lore raw
Quoted 7 lines · Magnus Damm

From: Magnus Damm <[email protected]>

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.

This was certainly long overdue! Applied, thanks.