]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
tty: add missing const to termios hw-change helper
authorJohan Hovold <johan@kernel.org>
Mon, 21 May 2018 11:08:44 +0000 (13:08 +0200)
committerJohan Hovold <johan@kernel.org>
Tue, 22 May 2018 08:08:05 +0000 (10:08 +0200)
Add missing const qualifiers to the parameters of the termios hw-change
helper, which is used by a few USB serial drivers. This specifically
allows the pl2303 driver to use const arguments in one of its helper as
well.

Cc: Jiri Slaby <jslaby@suse.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/tty/tty_ioctl.c
include/linux/tty.h

index d9b561d8943237eaa4b343a20351ee44911b7016..d99fec44036c38156c996d840ac5c45643d2da2c 100644 (file)
@@ -290,7 +290,7 @@ EXPORT_SYMBOL(tty_termios_copy_hw);
  *     between the two termios structures, or a speed change is needed.
  */
 
-int tty_termios_hw_change(struct ktermios *a, struct ktermios *b)
+int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b)
 {
        if (a->c_ispeed != b->c_ispeed || a->c_ospeed != b->c_ospeed)
                return 1;
index 1dd587ba6d882bb882b44680ec1acebb314c4364..955cd0c93d845ca370f11f28e787dfa6246aed37 100644 (file)
@@ -527,7 +527,7 @@ static inline speed_t tty_get_baud_rate(struct tty_struct *tty)
 }
 
 extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old);
-extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b);
+extern int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b);
 extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
 
 extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *);