tty: constify tty_ldisc_receive_buf buffer pointer
authorRob Herring <robh@kernel.org>
Mon, 16 Jan 2017 22:54:31 +0000 (16:54 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2017 16:22:34 +0000 (17:22 +0100)
This is needed to work with the client operations which uses const ptrs.

Really, the flags pointer could be const, too, but this would be a tree
wide fix.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_buffer.c
include/linux/tty.h

index aa80dc94ddc2fe6969049a62479548c22a7931b5..f4dc3e296dd52dfd0270a890edcea817a5153bcd 100644 (file)
@@ -422,7 +422,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
  *
  *     Returns the number of bytes not processed
  */
-int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
+int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
                          char *f, int count)
 {
        if (ld->ops->receive_buf2)
index 86c7853282b7efafc32ab8046e1834f3e76c5f41..21c0fabfed60114ffb8b73482da951b9d0008f73 100644 (file)
@@ -657,7 +657,7 @@ extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty);
 extern void tty_ldisc_release(struct tty_struct *tty);
 extern void tty_ldisc_init(struct tty_struct *tty);
 extern void tty_ldisc_deinit(struct tty_struct *tty);
-extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, unsigned char *p,
+extern int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
                                 char *f, int count);
 
 /* n_tty.c */