Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: sh-sci: Fix module clock refcount for serial console.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Paul Mundt and committed by
Paul Mundt
005a336e 1534a3b3

+11
+11
drivers/serial/sh-sci.c
··· 78 78 struct timer_list break_timer; 79 79 int break_flag; 80 80 81 + #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 81 82 /* Port clock */ 82 83 struct clk *clk; 84 + #endif 83 85 }; 84 86 85 87 #ifdef CONFIG_SH_KGDB ··· 960 958 if (s->enable) 961 959 s->enable(port); 962 960 961 + #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 963 962 s->clk = clk_get(NULL, "module_clk"); 963 + #endif 964 964 965 965 sci_request_irq(s); 966 966 sci_start_tx(port); ··· 982 978 if (s->disable) 983 979 s->disable(port); 984 980 981 + #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 985 982 clk_put(s->clk); 986 983 s->clk = NULL; 984 + #endif 987 985 } 988 986 989 987 static void sci_set_termios(struct uart_port *port, struct ktermios *termios, ··· 1236 1230 return -ENODEV; 1237 1231 1238 1232 port->type = serial_console_port->type; 1233 + 1234 + #if defined(CONFIG_SUPERH) && !defined(CONFIG_SUPERH64) 1235 + if (!serial_console_port->clk) 1236 + serial_console_port->clk = clk_get(NULL, "module_clk"); 1237 + #endif 1239 1238 1240 1239 if (port->flags & UPF_IOREMAP) 1241 1240 sci_config_port(port, 0);