Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=005a336e71e9e3ea356f9afca5d66318d6901319 Commit: 005a336e71e9e3ea356f9afca5d66318d6901319 Parent: 1534a3b3dc1cbab006f0add253be1b095d738b82 Author: Paul Mundt <[EMAIL PROTECTED]> AuthorDate: Thu Apr 26 11:45:32 2007 +0900 Committer: Paul Mundt <[EMAIL PROTECTED]> CommitDate: Mon May 7 02:11:56 2007 +0000
serial: sh-sci: Fix module clock refcount for serial console. Signed-off-by: Paul Mundt <[EMAIL PROTECTED]> --- drivers/serial/sh-sci.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index e5cf57f..1f89496 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c @@ -78,8 +78,10 @@ struct sci_port { struct timer_list break_timer; int break_flag; +#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) /* Port clock */ struct clk *clk; +#endif }; #ifdef CONFIG_SH_KGDB @@ -958,7 +960,9 @@ static int sci_startup(struct uart_port *port) if (s->enable) s->enable(port); +#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) s->clk = clk_get(NULL, "module_clk"); +#endif sci_request_irq(s); sci_start_tx(port); @@ -978,8 +982,10 @@ static void sci_shutdown(struct uart_port *port) if (s->disable) s->disable(port); +#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) clk_put(s->clk); s->clk = NULL; +#endif } static void sci_set_termios(struct uart_port *port, struct ktermios *termios, @@ -1231,6 +1237,11 @@ static int __init serial_console_setup(struct console *co, char *options) port->type = serial_console_port->type; +#if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) + if (!serial_console_port->clk) + serial_console_port->clk = clk_get(NULL, "module_clk"); +#endif + if (port->flags & UPF_IOREMAP) sci_config_port(port, 0); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html