[COMMON] i2c: s3c2410: prepare I2C clock once on probe
authorYoungmin Nam <youngmin.nam@samsung.com>
Mon, 21 Nov 2016 06:42:11 +0000 (15:42 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:40:57 +0000 (13:40 +0900)
Change-Id: I71ac919cc793edbe2dab2587c225d7a3e61fee22
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index f472e9321631d54b865a798c055c85c30bd95e36..d9a0149482f5b4ff14e1edd6d9d86ef77675e60f 100644 (file)
@@ -1213,6 +1213,11 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 
        dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk);
 
+       ret = clk_prepare(i2c->clk);
+       if (ret) {
+               dev_err(&pdev->dev, "I2C clock prepare failed\n");
+               return ret;
+       }
 
        /* map the registers */