Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a63d224 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e63be3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -67,7 +67,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
	if (of_property_read_u32(np, "clock-frequency", &clk)) {
	if (of_property_read_u32(np, "clock-frequency", &clk)) {


		/* Get clk rate through clk driver if present */
		/* 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)) {
		if (IS_ERR(info->clk)) {
			dev_warn(&ofdev->dev,
			dev_warn(&ofdev->dev,
				"clk or clock-frequency not defined\n");
				"clk or clock-frequency not defined\n");