From: Masahiro Yamada Date: Mon, 25 May 2015 05:57:43 +0000 (+0900) Subject: serial: of_serial: use devm_clk_get() instead of clk_get() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a63d22425ff229c8fb51e7aec1de1e9a4e19b34;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git serial: of_serial: use devm_clk_get() instead of clk_get() The probe method of this driver calls clk_get(), but clk_put() is missing from the remove callback. Using the managed clk function is easier than fixing other parts. Signed-off-by: Masahiro Yamada Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c index 28b9b4789bbf..d353fdf55ac1 100644 --- a/drivers/tty/serial/of_serial.c +++ b/drivers/tty/serial/of_serial.c @@ -67,7 +67,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev, if (of_property_read_u32(np, "clock-frequency", &clk)) { /* Get clk rate through clk driver if present */ - info->clk = clk_get(&ofdev->dev, NULL); + info->clk = devm_clk_get(&ofdev->dev, NULL); if (IS_ERR(info->clk)) { dev_warn(&ofdev->dev, "clk or clock-frequency not defined\n");