aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/amba-pl011.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/amba-pl011.c')
-rw-r--r--drivers/tty/serial/amba-pl011.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 92b1ac8db63d..3322023e38aa 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1324,16 +1324,12 @@ static int pl011_startup(struct uart_port *port)
1324 "could not set default pins\n"); 1324 "could not set default pins\n");
1325 } 1325 }
1326 1326
1327 retval = clk_prepare(uap->clk);
1328 if (retval)
1329 goto out;
1330
1331 /* 1327 /*
1332 * Try to enable the clock producer. 1328 * Try to enable the clock producer.
1333 */ 1329 */
1334 retval = clk_enable(uap->clk); 1330 retval = clk_prepare_enable(uap->clk);
1335 if (retval) 1331 if (retval)
1336 goto clk_unprep; 1332 goto out;
1337 1333
1338 uap->port.uartclk = clk_get_rate(uap->clk); 1334 uap->port.uartclk = clk_get_rate(uap->clk);
1339 1335
@@ -1411,9 +1407,7 @@ static int pl011_startup(struct uart_port *port)
1411 return 0; 1407 return 0;
1412 1408
1413 clk_dis: 1409 clk_dis:
1414 clk_disable(uap->clk); 1410 clk_disable_unprepare(uap->clk);
1415 clk_unprep:
1416 clk_unprepare(uap->clk);
1417 out: 1411 out:
1418 return retval; 1412 return retval;
1419} 1413}
@@ -1473,8 +1467,7 @@ static void pl011_shutdown(struct uart_port *port)
1473 /* 1467 /*
1474 * Shut down the clock producer 1468 * Shut down the clock producer
1475 */ 1469 */
1476 clk_disable(uap->clk); 1470 clk_disable_unprepare(uap->clk);
1477 clk_unprepare(uap->clk);
1478 /* Optionally let pins go into sleep states */ 1471 /* Optionally let pins go into sleep states */
1479 if (!IS_ERR(uap->pins_sleep)) { 1472 if (!IS_ERR(uap->pins_sleep)) {
1480 retval = pinctrl_select_state(uap->pinctrl, uap->pins_sleep); 1473 retval = pinctrl_select_state(uap->pinctrl, uap->pins_sleep);