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:
Родитель
16874b0709
Коммит
4c5c95f53b
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче