Commit 4c5c95f5 authored by Russell King's avatar Russell King Committed by Wolfram Sang

I2C: mv64xxx: use devm_clk_get() to avoid missing clk_put()

This driver forgets to use clk_put().  Rather than adding clk_put(),
lets instead use devm_clk_get() to obtain this clock so that it's
automatically handled on cleanup.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Acked-by: default avatarMark A. Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 16874b07
......@@ -599,7 +599,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
#if defined(CONFIG_HAVE_CLK)
/* Not all platforms have a clk */
drv_data->clk = clk_get(&pd->dev, NULL);
drv_data->clk = devm_clk_get(&pd->dev, NULL);
if (!IS_ERR(drv_data->clk)) {
clk_prepare(drv_data->clk);
clk_enable(drv_data->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