Skip to contentSkip to conversation

i2c: i2c-sh_mobile clock string removal

PATCH New Magnus Damm 1 participant 1 message Apr 21, 2011

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

PATCH 1/1 i2c: i2c-sh_mobile clock string removal

From: Magnus Damm <[email protected]>

Remove the clock string magic from the i2c-sh_mobile driver now when all platforms support clkdev properly.

---

 drivers/i2c/busses/i2c-sh_mobile.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-sh_mobile.c +2 -4
@@ -577,7 +577,6 @@ static int sh_mobile_i2c_probe(struct pl
 	struct sh_mobile_i2c_data *pd;
 	struct i2c_adapter *adap;
 	struct resource *res;
-	char clk_name[8];
 	int size;
 	int ret;
 
@@ -587,10 +586,9 @@ static int sh_mobile_i2c_probe(struct pl
 		return -ENOMEM;
 	}
 
-	snprintf(clk_name, sizeof(clk_name), "i2c%d", dev->id);
-	pd->clk = clk_get(&dev->dev, clk_name);
+	pd->clk = clk_get(&dev->dev, NULL);
 	if (IS_ERR(pd->clk)) {
-		dev_err(&dev->dev, "cannot get clock \"%s\"\n", clk_name);
+		dev_err(&dev->dev, "cannot get clock\n");
 		ret = PTR_ERR(pd->clk);
 		goto err;
 	}