Commit bba2be48 authored by Russell King's avatar Russell King

ARM: PNX4008: convert i2c clocks to match by device only

Acked-by: default avatarVitaly Wool <vitalywool@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 24fd1eda
...@@ -797,9 +797,9 @@ static struct clk_lookup onchip_clkreg[] = { ...@@ -797,9 +797,9 @@ static struct clk_lookup onchip_clkreg[] = {
{ .clk = &jpeg_ck, .con_id = "jpeg_ck" }, { .clk = &jpeg_ck, .con_id = "jpeg_ck" },
{ .clk = &ms_ck, .con_id = "ms_ck" }, { .clk = &ms_ck, .con_id = "ms_ck" },
{ .clk = &touch_ck, .con_id = "touch_ck" }, { .clk = &touch_ck, .con_id = "touch_ck" },
{ .clk = &i2c0_ck, .con_id = "i2c0_ck" }, { .clk = &i2c0_ck, .dev_id = "pnx-i2c.0" },
{ .clk = &i2c1_ck, .con_id = "i2c1_ck" }, { .clk = &i2c1_ck, .dev_id = "pnx-i2c.1" },
{ .clk = &i2c2_ck, .con_id = "i2c2_ck" }, { .clk = &i2c2_ck, .dev_id = "pnx-i2c.2" },
{ .clk = &spi0_ck, .con_id = "spi0_ck" }, { .clk = &spi0_ck, .con_id = "spi0_ck" },
{ .clk = &spi1_ck, .con_id = "spi1_ck" }, { .clk = &spi1_ck, .con_id = "spi1_ck" },
{ .clk = &uart3_ck, .con_id = "uart3_ck" }, { .clk = &uart3_ck, .con_id = "uart3_ck" },
......
...@@ -21,11 +21,9 @@ ...@@ -21,11 +21,9 @@
static int set_clock_run(struct platform_device *pdev) static int set_clock_run(struct platform_device *pdev)
{ {
struct clk *clk; struct clk *clk;
char name[10];
int retval = 0; int retval = 0;
snprintf(name, 10, "i2c%d_ck", pdev->id); clk = clk_get(&pdev->dev, NULL);
clk = clk_get(&pdev->dev, name);
if (!IS_ERR(clk)) { if (!IS_ERR(clk)) {
clk_set_rate(clk, 1); clk_set_rate(clk, 1);
clk_put(clk); clk_put(clk);
...@@ -38,11 +36,9 @@ static int set_clock_run(struct platform_device *pdev) ...@@ -38,11 +36,9 @@ static int set_clock_run(struct platform_device *pdev)
static int set_clock_stop(struct platform_device *pdev) static int set_clock_stop(struct platform_device *pdev)
{ {
struct clk *clk; struct clk *clk;
char name[10];
int retval = 0; int retval = 0;
snprintf(name, 10, "i2c%d_ck", pdev->id); clk = clk_get(&pdev->dev, NULL);
clk = clk_get(&pdev->dev, name);
if (!IS_ERR(clk)) { if (!IS_ERR(clk)) {
clk_set_rate(clk, 0); clk_set_rate(clk, 0);
clk_put(clk); clk_put(clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment