aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/amba-pl010.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/amba-pl010.c')
-rw-r--r--drivers/tty/serial/amba-pl010.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index 0d91a540bf11..22317dd16474 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -312,16 +312,12 @@ static int pl010_startup(struct uart_port *port)
312 struct uart_amba_port *uap = (struct uart_amba_port *)port; 312 struct uart_amba_port *uap = (struct uart_amba_port *)port;
313 int retval; 313 int retval;
314 314
315 retval = clk_prepare(uap->clk);
316 if (retval)
317 goto out;
318
319 /* 315 /*
320 * Try to enable the clock producer. 316 * Try to enable the clock producer.
321 */ 317 */
322 retval = clk_enable(uap->clk); 318 retval = clk_prepare_enable(uap->clk);
323 if (retval) 319 if (retval)
324 goto clk_unprep; 320 goto out;
325 321
326 uap->port.uartclk = clk_get_rate(uap->clk); 322 uap->port.uartclk = clk_get_rate(uap->clk);
327 323
@@ -346,9 +342,7 @@ static int pl010_startup(struct uart_port *port)
346 return 0; 342 return 0;
347 343
348 clk_dis: 344 clk_dis:
349 clk_disable(uap->clk); 345 clk_disable_unprepare(uap->clk);
350 clk_unprep:
351 clk_unprepare(uap->clk);
352 out: 346 out:
353 return retval; 347 return retval;
354} 348}
@@ -375,8 +369,7 @@ static void pl010_shutdown(struct uart_port *port)
375 /* 369 /*
376 * Shut down the clock producer 370 * Shut down the clock producer
377 */ 371 */
378 clk_disable(uap->clk); 372 clk_disable_unprepare(uap->clk);
379 clk_unprepare(uap->clk);
380} 373}
381 374
382static void 375static void