tty: serial: owl: add "much needed" clk_prepare_enable()
[platform/kernel/linux-rpi.git] / drivers / tty / serial / owl-uart.c
index d2d8b34..c55c850 100644 (file)
@@ -680,6 +680,12 @@ static int owl_uart_probe(struct platform_device *pdev)
                return PTR_ERR(owl_port->clk);
        }
 
+       ret = clk_prepare_enable(owl_port->clk);
+       if (ret) {
+               dev_err(&pdev->dev, "could not enable clk\n");
+               return ret;
+       }
+
        owl_port->port.dev = &pdev->dev;
        owl_port->port.line = pdev->id;
        owl_port->port.type = PORT_OWL;
@@ -712,6 +718,7 @@ static int owl_uart_remove(struct platform_device *pdev)
 
        uart_remove_one_port(&owl_uart_driver, &owl_port->port);
        owl_uart_ports[pdev->id] = NULL;
+       clk_disable_unprepare(owl_port->clk);
 
        return 0;
 }