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 <rmk+kernel@arm.linux.org.uk>
Acked-by: Mark A. Greer <mgreer@animalcreek.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Russell King 2013-05-16 21:34:10 +01:00 коммит произвёл Wolfram Sang
Родитель 16874b0709
Коммит 4c5c95f53b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

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