提交 1082d5d2 编写于 作者: M Magnus Damm 提交者: Ben Dooks

i2c: i2c-sh_mobile clock string removal

Remove the clock string magic from the i2c-sh_mobile driver
now when all platforms support clkdev properly.
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
上级 9f381a61
...@@ -577,7 +577,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) ...@@ -577,7 +577,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
struct sh_mobile_i2c_data *pd; struct sh_mobile_i2c_data *pd;
struct i2c_adapter *adap; struct i2c_adapter *adap;
struct resource *res; struct resource *res;
char clk_name[8];
int size; int size;
int ret; int ret;
...@@ -587,10 +586,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) ...@@ -587,10 +586,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
return -ENOMEM; return -ENOMEM;
} }
snprintf(clk_name, sizeof(clk_name), "i2c%d", dev->id); pd->clk = clk_get(&dev->dev, NULL);
pd->clk = clk_get(&dev->dev, clk_name);
if (IS_ERR(pd->clk)) { 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); ret = PTR_ERR(pd->clk);
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册