Skip to content

Commit

Permalink
serial: of_serial: use devm_clk_get() instead of clk_get()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Masahiro Yamada authored and Greg Kroah-Hartman committed May 31, 2015
1 parent 6e63be3 commit 3a63d22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/of_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3a63d22

Please sign in to comment.