diff options
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r-- | drivers/char/hvc_console.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index 5a8a4c28c867..09676b4e5d89 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c | |||
@@ -318,7 +318,8 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) | |||
318 | } /* else count == 0 */ | 318 | } /* else count == 0 */ |
319 | 319 | ||
320 | tty->driver_data = hp; | 320 | tty->driver_data = hp; |
321 | tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */ | 321 | if (!hp->irq_requested) |
322 | tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */ | ||
322 | 323 | ||
323 | hp->tty = tty; | 324 | hp->tty = tty; |
324 | 325 | ||
@@ -764,13 +765,11 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data, | |||
764 | return ERR_PTR(err); | 765 | return ERR_PTR(err); |
765 | } | 766 | } |
766 | 767 | ||
767 | hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size, | 768 | hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size, |
768 | GFP_KERNEL); | 769 | GFP_KERNEL); |
769 | if (!hp) | 770 | if (!hp) |
770 | return ERR_PTR(-ENOMEM); | 771 | return ERR_PTR(-ENOMEM); |
771 | 772 | ||
772 | memset(hp, 0x00, sizeof(*hp)); | ||
773 | |||
774 | hp->vtermno = vtermno; | 773 | hp->vtermno = vtermno; |
775 | hp->data = data; | 774 | hp->data = data; |
776 | hp->ops = ops; | 775 | hp->ops = ops; |
@@ -876,8 +875,11 @@ static int hvc_init(void) | |||
876 | goto stop_thread; | 875 | goto stop_thread; |
877 | } | 876 | } |
878 | 877 | ||
879 | /* FIXME: This mb() seems completely random. Remove it. */ | 878 | /* |
880 | mb(); | 879 | * Make sure tty is fully registered before allowing it to be |
880 | * found by hvc_console_device. | ||
881 | */ | ||
882 | smp_mb(); | ||
881 | hvc_driver = drv; | 883 | hvc_driver = drv; |
882 | return 0; | 884 | return 0; |
883 | 885 | ||