From: Youngmin Nam Date: Mon, 21 Nov 2016 06:42:11 +0000 (+0900) Subject: [COMMON] i2c: s3c2410: prepare I2C clock once on probe X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f6928be96e6ed20be9678cc6dfd6519179c5f721;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] i2c: s3c2410: prepare I2C clock once on probe Change-Id: I71ac919cc793edbe2dab2587c225d7a3e61fee22 Signed-off-by: Youngmin Nam --- diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index f472e9321631..d9a0149482f5 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -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 */