diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2012-06-12 19:33:30 +0200 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-09 14:18:05 +0200 |
commit | a3f24c0dbd0b9a7624d077b3c1841dde267aaa6c (patch) | |
tree | df05ada35254925726ab96345dc06f621cfb0992 /drivers/i2c/busses/i2c-stu300.c | |
parent | a55b44ac3fe07d4e89486817732b596fce6ab9f6 (diff) | |
download | op-kernel-dev-a3f24c0dbd0b9a7624d077b3c1841dde267aaa6c.zip op-kernel-dev-a3f24c0dbd0b9a7624d077b3c1841dde267aaa6c.tar.gz |
i2c: stu300: use clk_prepare/unprepare
Make sure we prepare/unprepare the clock for the ST U300
I2C driver as is required by the clk API especially if you
use common clock.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-stu300.c')
-rw-r--r-- | drivers/i2c/busses/i2c-stu300.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index 4d44af1..79b7851 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c @@ -924,7 +924,7 @@ stu300_probe(struct platform_device *pdev) dev->speed = scl_frequency; - clk_enable(dev->clk); + clk_prepare_enable(dev->clk); ret = stu300_init_hw(dev); clk_disable(dev->clk); @@ -960,6 +960,7 @@ stu300_probe(struct platform_device *pdev) err_add_adapter: err_init_hw: + clk_unprepare(dev->clk); free_irq(dev->irq, dev); err_no_irq: iounmap(dev->virtbase); @@ -1016,6 +1017,7 @@ stu300_remove(struct platform_device *pdev) free_irq(dev->irq, dev); iounmap(dev->virtbase); release_mem_region(dev->phybase, dev->physize); + clk_unprepare(dev->clk); clk_put(dev->clk); platform_set_drvdata(pdev, NULL); kfree(dev); |