login
Header Space

 
 

Re: [Patch] UML: Fix inconsistence due to tty_operation change

Previous thread: [Patch] (Resend) UML: make several more things static by WANG Cong on Friday, May 2, 2008 - 2:45 am. (1 message)

Next thread: [OP] ACPI-check-a-return-value-correctly-in-acpi_power_get_context.patch added to queue-2.6.22.23-op1 by oliver on Friday, May 2, 2008 - 4:37 am. (1 message)
To: <linux-kernel@...>
Cc: <jdike@...>, <user-mode-linux-devel@...>, <akpm@...>
Date: Friday, May 2, 2008 - 2:59 am

'put_char' of 'struct tty_operations' has changed from 'void' into 'int'.
This can also shut up comipler warnings.

Cc: Jeff Dike &lt;jdike@addtoit.com&gt;
Signed-off-by: WANG Cong &lt;wangcong@zeuux.org&gt;

---

diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 10b86e1..5047490 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -191,9 +191,9 @@ void line_flush_chars(struct tty_struct *tty)
  	line_flush_buffer(tty);
  }

-void line_put_char(struct tty_struct *tty, unsigned char ch)
+int line_put_char(struct tty_struct *tty, unsigned char ch)
  {
-	line_write(tty, &amp;ch, sizeof(ch));
+	return line_write(tty, &amp;ch, sizeof(ch));
  }

  int line_write(struct tty_struct *tty, const unsigned char *buf, int len)
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index 1223f2c..979b73e 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -71,7 +71,7 @@ extern int line_setup(struct line *lines, unsigned int sizeof_lines,
  		      char *init, char **error_out);
  extern int line_write(struct tty_struct *tty, const unsigned char *buf,
  		      int len);
-extern void line_put_char(struct tty_struct *tty, unsigned char ch);
+extern int line_put_char(struct tty_struct *tty, unsigned char ch);
  extern void line_set_termios(struct tty_struct *tty, struct ktermios * old);
  extern int line_chars_in_buffer(struct tty_struct *tty);
  extern void line_flush_buffer(struct tty_struct *tty);
--
To: WANG Cong <xiyou.wangcong@...>
Cc: <linux-kernel@...>, <jdike@...>, <user-mode-linux-devel@...>, <akpm@...>
Date: Friday, May 2, 2008 - 6:12 am

On Fri, 2 May 2008 14:59:46 +0800 (CST)

Acked-by: Alan Cox &lt;alan@redhat.com&gt;

--
To: WANG Cong <xiyou.wangcong@...>
Cc: <linux-kernel@...>, <jdike@...>, <user-mode-linux-devel@...>, <akpm@...>, Alan Cox <alan@...>
Date: Friday, May 2, 2008 - 5:31 am

[ Alan as tty maintainer added to Cc ]



cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--
Previous thread: [Patch] (Resend) UML: make several more things static by WANG Cong on Friday, May 2, 2008 - 2:45 am. (1 message)

Next thread: [OP] ACPI-check-a-return-value-correctly-in-acpi_power_get_context.patch added to queue-2.6.22.23-op1 by oliver on Friday, May 2, 2008 - 4:37 am. (1 message)
speck-geostationary