aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 11:16:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 11:16:57 -0500
commit7e4e574c391cdeef516411eb698ac6955f01d673 (patch)
treee9f3b05c464b82be608cef1a90688dd3719e1537 /drivers
parenta4fc7ab1d065a9dd89ed0e74439ef87d4a16e980 (diff)
parent97b1b999748d3cde6a3f381e0839e0f1082323e6 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/viocons.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index cb82ebf4cb07..faee5e7acaf7 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -131,7 +131,7 @@ static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp);
131 131
132static struct tty_driver *viotty_driver; 132static struct tty_driver *viotty_driver;
133 133
134void hvlog(char *fmt, ...) 134static void hvlog(char *fmt, ...)
135{ 135{
136 int i; 136 int i;
137 unsigned long flags; 137 unsigned long flags;
@@ -147,7 +147,7 @@ void hvlog(char *fmt, ...)
147 spin_unlock_irqrestore(&consoleloglock, flags); 147 spin_unlock_irqrestore(&consoleloglock, flags);
148} 148}
149 149
150void hvlogOutput(const char *buf, int count) 150static void hvlogOutput(const char *buf, int count)
151{ 151{
152 unsigned long flags; 152 unsigned long flags;
153 int begin; 153 int begin;
@@ -904,6 +904,7 @@ static void vioHandleData(struct HvLpEvent *event)
904 struct viocharlpevent *cevent = (struct viocharlpevent *)event; 904 struct viocharlpevent *cevent = (struct viocharlpevent *)event;
905 struct port_info *pi; 905 struct port_info *pi;
906 int index; 906 int index;
907 int num_pushed;
907 u8 port = cevent->virtual_device; 908 u8 port = cevent->virtual_device;
908 909
909 if (port >= VTTY_PORTS) { 910 if (port >= VTTY_PORTS) {
@@ -964,6 +965,7 @@ static void vioHandleData(struct HvLpEvent *event)
964 * functionality will only work if built into the kernel and 965 * functionality will only work if built into the kernel and
965 * then only if sysrq is enabled through the proc filesystem. 966 * then only if sysrq is enabled through the proc filesystem.
966 */ 967 */
968 num_pushed = 0;
967 for (index = 0; index < cevent->len; index++) { 969 for (index = 0; index < cevent->len; index++) {
968#ifdef CONFIG_MAGIC_SYSRQ 970#ifdef CONFIG_MAGIC_SYSRQ
969 if (sysrq_enabled) { 971 if (sysrq_enabled) {
@@ -997,11 +999,10 @@ static void vioHandleData(struct HvLpEvent *event)
997 printk(VIOCONS_KERN_WARN "input buffer overflow!\n"); 999 printk(VIOCONS_KERN_WARN "input buffer overflow!\n");
998 break; 1000 break;
999 } 1001 }
1002 num_pushed++;
1000 } 1003 }
1001 1004
1002 /* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */ 1005 if (num_pushed)
1003 if (tty->flip.count)
1004 /* The next call resets flip.count when the data is flushed. */
1005 tty_flip_buffer_push(tty); 1006 tty_flip_buffer_push(tty);
1006} 1007}
1007 1008