diff options
author | Paul Cercueil <paul@crapouillou.net> | 2017-12-28 14:07:07 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 16:46:26 +0100 |
commit | 0f646b63a1b2ede7885e45cf6e986128e001f91b (patch) | |
tree | 9f865b1743aeffb8148473f24515633838b27577 /drivers/tty | |
parent | b9820a31691b771db37afe2054dd3d3a680c1eed (diff) | |
download | linux-0f646b63a1b2ede7885e45cf6e986128e001f91b.tar.bz2 |
serial: core: Make uart_parse_options take const char* argument
The pointed string is never modified from within uart_parse_options, so
it should be marked as const in the function prototype.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index f57969de2f1c..2148883db66d 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -1955,9 +1955,10 @@ EXPORT_SYMBOL_GPL(uart_parse_earlycon); * eg: 115200n8r */ void -uart_parse_options(char *options, int *baud, int *parity, int *bits, int *flow) +uart_parse_options(const char *options, int *baud, int *parity, + int *bits, int *flow) { - char *s = options; + const char *s = options; *baud = simple_strtoul(s, NULL, 10); while (*s >= '0' && *s <= '9') |