diff options
| author | Philipp Zabel <philipp.zabel@gmail.com> | 2012-03-15 14:15:15 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-15 16:46:04 -0400 |
| commit | fb8ebec00b04f921ea1614a7303f1a8e5e9e47c5 (patch) | |
| tree | 2f3833379c7924ca6d2625c57069207f49534b13 /drivers | |
| parent | 4a4c61b7ce26bfc9d49ea4bd121d52114bad9f99 (diff) | |
serial: pxa: add clk_prepare/clk_unprepare calls
This patch adds clk_prepare/clk_unprepare calls to the serial/pxa
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/tty/serial/pxa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index 5c8e3bba6c84..e2fd3d8e0ab4 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c | |||
| @@ -579,9 +579,9 @@ serial_pxa_pm(struct uart_port *port, unsigned int state, | |||
| 579 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; | 579 | struct uart_pxa_port *up = (struct uart_pxa_port *)port; |
| 580 | 580 | ||
| 581 | if (!state) | 581 | if (!state) |
| 582 | clk_enable(up->clk); | 582 | clk_prepare_enable(up->clk); |
| 583 | else | 583 | else |
| 584 | clk_disable(up->clk); | 584 | clk_disable_unprepare(up->clk); |
| 585 | } | 585 | } |
| 586 | 586 | ||
| 587 | static void serial_pxa_release_port(struct uart_port *port) | 587 | static void serial_pxa_release_port(struct uart_port *port) |
| @@ -668,7 +668,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) | |||
| 668 | struct uart_pxa_port *up = serial_pxa_ports[co->index]; | 668 | struct uart_pxa_port *up = serial_pxa_ports[co->index]; |
| 669 | unsigned int ier; | 669 | unsigned int ier; |
| 670 | 670 | ||
| 671 | clk_enable(up->clk); | 671 | clk_prepare_enable(up->clk); |
| 672 | 672 | ||
| 673 | /* | 673 | /* |
| 674 | * First save the IER then disable the interrupts | 674 | * First save the IER then disable the interrupts |
| @@ -685,7 +685,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) | |||
| 685 | wait_for_xmitr(up); | 685 | wait_for_xmitr(up); |
| 686 | serial_out(up, UART_IER, ier); | 686 | serial_out(up, UART_IER, ier); |
| 687 | 687 | ||
| 688 | clk_disable(up->clk); | 688 | clk_disable_unprepare(up->clk); |
| 689 | } | 689 | } |
| 690 | 690 | ||
| 691 | static int __init | 691 | static int __init |
