Skip to content

Commit

Permalink
i2c: i2c-sh_mobile clock string removal
Browse files Browse the repository at this point in the history
Remove the clock string magic from the i2c-sh_mobile driver
now when all platforms support clkdev properly.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Magnus Damm authored and Ben Dooks committed May 11, 2011
1 parent 9f381a6 commit 1082d5d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/i2c/busses/i2c-sh_mobile.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
struct sh_mobile_i2c_data *pd;
struct i2c_adapter *adap;
struct resource *res;
char clk_name[8];
int size;
int ret;

Expand All @@ -587,10 +586,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
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;
}
Expand Down

0 comments on commit 1082d5d

Please sign in to comment.