Skip to content

Commit 3a63d22

Browse files
masahir0ygregkh
authored andcommitted
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 <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 6e63be3 commit 3a63d22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/of_serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int of_platform_serial_setup(struct platform_device *ofdev,
6767
if (of_property_read_u32(np, "clock-frequency", &clk)) {
6868

6969
/* Get clk rate through clk driver if present */
70-
info->clk = clk_get(&ofdev->dev, NULL);
70+
info->clk = devm_clk_get(&ofdev->dev, NULL);
7171
if (IS_ERR(info->clk)) {
7272
dev_warn(&ofdev->dev,
7373
"clk or clock-frequency not defined\n");

0 commit comments

Comments
 (0)