projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'trace-v4.4-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
tty
/
serial
/
sunhv.c
diff --git
a/drivers/tty/serial/sunhv.c
b/drivers/tty/serial/sunhv.c
index 064031870ba0d1b0bf09fd3bcb299d17dcaf76d5..ca0d3802f2af45fb8be9cad11d9763fb615e516a 100644
(file)
--- a/
drivers/tty/serial/sunhv.c
+++ b/
drivers/tty/serial/sunhv.c
@@
-148,8
+148,10
@@
static int receive_chars_read(struct uart_port *port)
uart_handle_dcd_change(port, 1);
}
uart_handle_dcd_change(port, 1);
}
- for (i = 0; i < bytes_read; i++)
- uart_handle_sysrq_char(port, con_read_page[i]);
+ if (port->sysrq != 0 && *con_read_page) {
+ for (i = 0; i < bytes_read; i++)
+ uart_handle_sysrq_char(port, con_read_page[i]);
+ }
if (port->state == NULL)
continue;
if (port->state == NULL)
continue;
@@
-168,17
+170,17
@@
struct sunhv_ops {
int (*receive_chars)(struct uart_port *port);
};
int (*receive_chars)(struct uart_port *port);
};
-static struct sunhv_ops bychar_ops = {
+static
const
struct sunhv_ops bychar_ops = {
.transmit_chars = transmit_chars_putchar,
.receive_chars = receive_chars_getchar,
};
.transmit_chars = transmit_chars_putchar,
.receive_chars = receive_chars_getchar,
};
-static struct sunhv_ops bywrite_ops = {
+static
const
struct sunhv_ops bywrite_ops = {
.transmit_chars = transmit_chars_write,
.receive_chars = receive_chars_read,
};
.transmit_chars = transmit_chars_write,
.receive_chars = receive_chars_read,
};
-static struct sunhv_ops *sunhv_ops = &bychar_ops;
+static
const
struct sunhv_ops *sunhv_ops = &bychar_ops;
static struct tty_port *receive_chars(struct uart_port *port)
{
static struct tty_port *receive_chars(struct uart_port *port)
{