linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty flip buffer handling
@ 2006-02-23  1:14 Thomas Koeller
  2006-02-23 13:12 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Koeller @ 2006-02-23  1:14 UTC (permalink / raw)
  To: Alan Cox, linux-kernel

Add a couple of 'const' qualifiers to the TTY flip buffer APIs,
where appropriate.

Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>

diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index e9bba94..2d041bc 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -354,7 +354,7 @@ int tty_buffer_request_room(struct tty_s
 
 EXPORT_SYMBOL_GPL(tty_buffer_request_room);
 
-int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, size_t size)
+int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size)
 {
 	int copied = 0;
 	do {
@@ -378,7 +378,7 @@ int tty_insert_flip_string(struct tty_st
 
 EXPORT_SYMBOL_GPL(tty_insert_flip_string);
 
-int tty_insert_flip_string_flags(struct tty_struct *tty, unsigned char *chars, char *flags, size_t size)
+int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size)
 {
 	int copied = 0;
 	do {
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 222faf9..cbe5ce3 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -2,8 +2,8 @@
 #define _LINUX_TTY_FLIP_H
 
 extern int tty_buffer_request_room(struct tty_struct *tty, size_t size);
-extern int tty_insert_flip_string(struct tty_struct *tty, unsigned char *chars, size_t size);
-extern int tty_insert_flip_string_flags(struct tty_struct *tty, unsigned char *chars, char *flags, size_t size);
+extern int tty_insert_flip_string(struct tty_struct *tty, const unsigned char *chars, size_t size);
+extern int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size);
 extern int tty_prepare_flip_string(struct tty_struct *tty, unsigned char **chars, size_t size);
 extern int tty_prepare_flip_string_flags(struct tty_struct *tty, unsigned char **chars, char **flags, size_t size);
 

-- 
Thomas Koeller
thomas@koeller.dyndns.org

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tty flip buffer handling
  2006-02-23  1:14 [PATCH] tty flip buffer handling Thomas Koeller
@ 2006-02-23 13:12 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2006-02-23 13:12 UTC (permalink / raw)
  To: Thomas Koeller; +Cc: Alan Cox, linux-kernel

On Thu, Feb 23, 2006 at 02:14:08AM +0100, Thomas Koeller wrote:
> Add a couple of 'const' qualifiers to the TTY flip buffer APIs,
> where appropriate.
> 
> Signed-off-by: Thomas Koeller <thomas@koeller.dyndns.org>

Acked-by: Alan Cox <alan@redhat.com>

--
	The Master doesn't talk, he acts.
	When his work is done, 
	the people say, "Amazing: 
	we did it, all by ourselves!"		-- Lao-tzu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-23 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-23  1:14 [PATCH] tty flip buffer handling Thomas Koeller
2006-02-23 13:12 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).