backlight: adp5520: rename common defines and typos
[safe/jmp/linux-2.6] / drivers / char / hvc_console.c
index f2685b7..416d342 100644 (file)
@@ -318,7 +318,6 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
        } /* else count == 0 */
 
        tty->driver_data = hp;
-       tty->low_latency = 1; /* Makes flushes to ldisc synchronous. */
 
        hp->tty = tty;
 
@@ -517,8 +516,6 @@ static void hvc_set_winsz(struct work_struct *work)
        struct winsize ws;
 
        hp = container_of(work, struct hvc_struct, tty_resize);
-       if (!hp)
-               return;
 
        spin_lock_irqsave(&hp->lock, hvc_flags);
        if (!hp->tty) {
@@ -553,7 +550,7 @@ static int hvc_chars_in_buffer(struct tty_struct *tty)
        struct hvc_struct *hp = tty->driver_data;
 
        if (!hp)
-               return -1;
+               return 0;
        return hp->n_outbuf;
 }
 
@@ -681,7 +678,7 @@ int hvc_poll(struct hvc_struct *hp)
 EXPORT_SYMBOL_GPL(hvc_poll);
 
 /**
- * hvc_resize() - Update terminal window size information.
+ * __hvc_resize() - Update terminal window size information.
  * @hp:                HVC console pointer
  * @ws:                Terminal window size structure
  *
@@ -690,12 +687,12 @@ EXPORT_SYMBOL_GPL(hvc_poll);
  *
  * Locking:    Locking free; the function MUST be called holding hp->lock
  */
-void hvc_resize(struct hvc_struct *hp, struct winsize ws)
+void __hvc_resize(struct hvc_struct *hp, struct winsize ws)
 {
        hp->ws = ws;
        schedule_work(&hp->tty_resize);
 }
-EXPORT_SYMBOL_GPL(hvc_resize);
+EXPORT_SYMBOL_GPL(__hvc_resize);
 
 /*
  * This kthread is either polling or interrupt driven.  This is determined by
@@ -764,13 +761,11 @@ struct hvc_struct __devinit *hvc_alloc(uint32_t vtermno, int data,
                        return ERR_PTR(err);
        }
 
-       hp = kmalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
+       hp = kzalloc(ALIGN(sizeof(*hp), sizeof(long)) + outbuf_size,
                        GFP_KERNEL);
        if (!hp)
                return ERR_PTR(-ENOMEM);
 
-       memset(hp, 0x00, sizeof(*hp));
-
        hp->vtermno = vtermno;
        hp->data = data;
        hp->ops = ops;
@@ -837,6 +832,7 @@ int hvc_remove(struct hvc_struct *hp)
                tty_hangup(tty);
        return 0;
 }
+EXPORT_SYMBOL_GPL(hvc_remove);
 
 /* Driver initialization: called as soon as someone uses hvc_alloc(). */
 static int hvc_init(void)