aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-01-21 17:45:50 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-21 17:45:50 -0500
commitba899dbc036d24ab6b45faf64e3648a268721cc9 (patch)
tree8d3ca704ce6cc250d538c712395d357145fa16b6
parentca740803856f23dbc5b1872039291231bc131ecb (diff)
[SERIAL] Make port->ops constant
No one should write to the port->ops structure, so make it constant. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/serial/serial_core.c4
-rw-r--r--include/linux/serial_core.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 943770470b9d..74142b731527 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1870,7 +1870,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
1870 mutex_lock(&state->mutex); 1870 mutex_lock(&state->mutex);
1871 1871
1872 if (state->info && state->info->flags & UIF_INITIALIZED) { 1872 if (state->info && state->info->flags & UIF_INITIALIZED) {
1873 struct uart_ops *ops = port->ops; 1873 const struct uart_ops *ops = port->ops;
1874 1874
1875 spin_lock_irq(&port->lock); 1875 spin_lock_irq(&port->lock);
1876 ops->stop_tx(port); 1876 ops->stop_tx(port);
@@ -1932,7 +1932,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
1932 } 1932 }
1933 1933
1934 if (state->info && state->info->flags & UIF_INITIALIZED) { 1934 if (state->info && state->info->flags & UIF_INITIALIZED) {
1935 struct uart_ops *ops = port->ops; 1935 const struct uart_ops *ops = port->ops;
1936 int ret; 1936 int ret;
1937 1937
1938 ops->set_mctrl(port, 0); 1938 ops->set_mctrl(port, 0);
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index f3af47713a4e..b74ff34469b9 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -257,7 +257,7 @@ struct uart_port {
257 unsigned int mctrl; /* current modem ctrl settings */ 257 unsigned int mctrl; /* current modem ctrl settings */
258 unsigned int timeout; /* character-based timeout */ 258 unsigned int timeout; /* character-based timeout */
259 unsigned int type; /* port type */ 259 unsigned int type; /* port type */
260 struct uart_ops *ops; 260 const struct uart_ops *ops;
261 unsigned int custom_divisor; 261 unsigned int custom_divisor;
262 unsigned int line; /* port index */ 262 unsigned int line; /* port index */
263 unsigned long mapbase; /* for ioremap */ 263 unsigned long mapbase; /* for ioremap */