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: Russell King <[email protected]>
Acked-by: Mark A. Greer <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
Russell King 2013-05-16 21:34:10 +01:00 • committed by Wolfram Sang
commit 4c5c95f53b

View file

@ -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);