tty: make fp of tty_ldisc_ops::receive_buf{,2} const
Char pointer (cp) passed to tty_ldisc_ops::receive_buf{,2} is const. There is no reason for flag pointer (fp) not to be too. So switch it in the definition and all uses. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@reisers.ca> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Johan Hedberg <johan.hedberg@gmail.com> Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Cc: Andreas Koensgen <ajk@comnets.uni-bremen.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20210505091928.22010-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fc0df90b78
commit
0f3dcf3b5d
@ -455,7 +455,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
|
||||
* Returns the number of bytes processed
|
||||
*/
|
||||
int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
|
||||
char *f, int count)
|
||||
const char *f, int count)
|
||||
{
|
||||
if (ld->ops->receive_buf2)
|
||||
count = ld->ops->receive_buf2(ld->tty, p, f, count);
|
||||
@ -472,7 +472,7 @@ static int
|
||||
receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
|
||||
{
|
||||
unsigned char *p = char_buf_ptr(head, head->read);
|
||||
char *f = NULL;
|
||||
const char *f = NULL;
|
||||
int n;
|
||||
|
||||
if (~head->flags & TTYB_NORMAL)
|
||||
|
Reference in New Issue
Block a user