mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 14:31:46 +00:00
[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>
This commit is contained in:
parent
ca74080385
commit
ba899dbc03
2 changed files with 3 additions and 3 deletions
|
@ -1870,7 +1870,7 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
|
||||||
mutex_lock(&state->mutex);
|
mutex_lock(&state->mutex);
|
||||||
|
|
||||||
if (state->info && state->info->flags & UIF_INITIALIZED) {
|
if (state->info && state->info->flags & UIF_INITIALIZED) {
|
||||||
struct uart_ops *ops = port->ops;
|
const struct uart_ops *ops = port->ops;
|
||||||
|
|
||||||
spin_lock_irq(&port->lock);
|
spin_lock_irq(&port->lock);
|
||||||
ops->stop_tx(port);
|
ops->stop_tx(port);
|
||||||
|
@ -1932,7 +1932,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state->info && state->info->flags & UIF_INITIALIZED) {
|
if (state->info && state->info->flags & UIF_INITIALIZED) {
|
||||||
struct uart_ops *ops = port->ops;
|
const struct uart_ops *ops = port->ops;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ops->set_mctrl(port, 0);
|
ops->set_mctrl(port, 0);
|
||||||
|
|
|
@ -257,7 +257,7 @@ struct uart_port {
|
||||||
unsigned int mctrl; /* current modem ctrl settings */
|
unsigned int mctrl; /* current modem ctrl settings */
|
||||||
unsigned int timeout; /* character-based timeout */
|
unsigned int timeout; /* character-based timeout */
|
||||||
unsigned int type; /* port type */
|
unsigned int type; /* port type */
|
||||||
struct uart_ops *ops;
|
const struct uart_ops *ops;
|
||||||
unsigned int custom_divisor;
|
unsigned int custom_divisor;
|
||||||
unsigned int line; /* port index */
|
unsigned int line; /* port index */
|
||||||
unsigned long mapbase; /* for ioremap */
|
unsigned long mapbase; /* for ioremap */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue