diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2015-05-25 01:57:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-31 17:55:12 -0400 |
commit | 3a63d22425ff229c8fb51e7aec1de1e9a4e19b34 (patch) | |
tree | e606630415ed38792be12f23b078bbc0e61626cc | |
parent | 6e63be3fee141cc6d122f648b524a66160dbe6aa (diff) |
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>
-rw-r--r-- | drivers/tty/serial/of_serial.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, | |||
67 | if (of_property_read_u32(np, "clock-frequency", &clk)) { | 67 | if (of_property_read_u32(np, "clock-frequency", &clk)) { |
68 | 68 | ||
69 | /* Get clk rate through clk driver if present */ | 69 | /* 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); |
71 | if (IS_ERR(info->clk)) { | 71 | if (IS_ERR(info->clk)) { |
72 | dev_warn(&ofdev->dev, | 72 | dev_warn(&ofdev->dev, |
73 | "clk or clock-frequency not defined\n"); | 73 | "clk or clock-frequency not defined\n"); |