aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-11-20 05:46:24 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-12 12:32:38 -0500
commitbba2be480b981bc1e7bea24c2a2552b0ad7e9774 (patch)
tree561a133526f62bcf0999ad22d20b0bcb904c6828
parent24fd1edaac79fe9554c557f9f93b3197c136c236 (diff)
ARM: PNX4008: convert i2c clocks to match by device only
Acked-by: Vitaly Wool <vitalywool@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-pnx4008/clock.c6
-rw-r--r--arch/arm/mach-pnx4008/i2c.c8
2 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c
index 944ffa94d325..5a1515210969 100644
--- a/arch/arm/mach-pnx4008/clock.c
+++ b/arch/arm/mach-pnx4008/clock.c
@@ -797,9 +797,9 @@ static struct clk_lookup onchip_clkreg[] = {
797 { .clk = &jpeg_ck, .con_id = "jpeg_ck" }, 797 { .clk = &jpeg_ck, .con_id = "jpeg_ck" },
798 { .clk = &ms_ck, .con_id = "ms_ck" }, 798 { .clk = &ms_ck, .con_id = "ms_ck" },
799 { .clk = &touch_ck, .con_id = "touch_ck" }, 799 { .clk = &touch_ck, .con_id = "touch_ck" },
800 { .clk = &i2c0_ck, .con_id = "i2c0_ck" }, 800 { .clk = &i2c0_ck, .dev_id = "pnx-i2c.0" },
801 { .clk = &i2c1_ck, .con_id = "i2c1_ck" }, 801 { .clk = &i2c1_ck, .dev_id = "pnx-i2c.1" },
802 { .clk = &i2c2_ck, .con_id = "i2c2_ck" }, 802 { .clk = &i2c2_ck, .dev_id = "pnx-i2c.2" },
803 { .clk = &spi0_ck, .con_id = "spi0_ck" }, 803 { .clk = &spi0_ck, .con_id = "spi0_ck" },
804 { .clk = &spi1_ck, .con_id = "spi1_ck" }, 804 { .clk = &spi1_ck, .con_id = "spi1_ck" },
805 { .clk = &uart3_ck, .con_id = "uart3_ck" }, 805 { .clk = &uart3_ck, .con_id = "uart3_ck" },
diff --git a/arch/arm/mach-pnx4008/i2c.c b/arch/arm/mach-pnx4008/i2c.c
index f3fea29c00d3..c986b3a61311 100644
--- a/arch/arm/mach-pnx4008/i2c.c
+++ b/arch/arm/mach-pnx4008/i2c.c
@@ -21,11 +21,9 @@
21static int set_clock_run(struct platform_device *pdev) 21static int set_clock_run(struct platform_device *pdev)
22{ 22{
23 struct clk *clk; 23 struct clk *clk;
24 char name[10];
25 int retval = 0; 24 int retval = 0;
26 25
27 snprintf(name, 10, "i2c%d_ck", pdev->id); 26 clk = clk_get(&pdev->dev, NULL);
28 clk = clk_get(&pdev->dev, name);
29 if (!IS_ERR(clk)) { 27 if (!IS_ERR(clk)) {
30 clk_set_rate(clk, 1); 28 clk_set_rate(clk, 1);
31 clk_put(clk); 29 clk_put(clk);
@@ -38,11 +36,9 @@ static int set_clock_run(struct platform_device *pdev)
38static int set_clock_stop(struct platform_device *pdev) 36static int set_clock_stop(struct platform_device *pdev)
39{ 37{
40 struct clk *clk; 38 struct clk *clk;
41 char name[10];
42 int retval = 0; 39 int retval = 0;
43 40
44 snprintf(name, 10, "i2c%d_ck", pdev->id); 41 clk = clk_get(&pdev->dev, NULL);
45 clk = clk_get(&pdev->dev, name);
46 if (!IS_ERR(clk)) { 42 if (!IS_ERR(clk)) {
47 clk_set_rate(clk, 0); 43 clk_set_rate(clk, 0);
48 clk_put(clk); 44 clk_put(clk);