tty: serial: uartlite: Enable clocks at probe

At probe the uartlite is getting configured.
Enable the clocks before assiging uart and
disable after probe is done.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Shubhrajyoti Datta
2018-08-06 14:22:11 +05:30
committed by Greg Kroah-Hartman
parent 9d7c249a1e
commit ea42d7a67a
+6 -2
View File
@@ -776,13 +776,17 @@ static int ulite_probe(struct platform_device *pdev)
pdata->clk = NULL; pdata->clk = NULL;
} }
ret = clk_prepare(pdata->clk); ret = clk_prepare_enable(pdata->clk);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to prepare clock\n"); dev_err(&pdev->dev, "Failed to prepare clock\n");
return ret; return ret;
} }
return ulite_assign(&pdev->dev, id, res->start, irq, pdata); ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
clk_disable(pdata->clk);
return ret;
} }
static int ulite_remove(struct platform_device *pdev) static int ulite_remove(struct platform_device *pdev)