]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/whiteheat.c
USB: remove info() macro from usb/serial drivers
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / whiteheat.c
index 05374b99a2f8c2567a2b710c2fde1ccc71b4cec1..39f7f8d291d6ec8669d9a0ca0c65a22f4fbc9073 100644 (file)
@@ -452,8 +452,9 @@ static int whiteheat_attach(struct usb_serial *serial)
 
        hw_info = (struct whiteheat_hw_info *)&result[1];
 
-       info("%s: Driver %s: Firmware v%d.%02d", serial->type->description,
-            DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev);
+       dev_info(&serial->dev->dev, "%s: Driver %s: Firmware v%d.%02d\n",
+                serial->type->description, DRIVER_VERSION,
+                hw_info->sw_major_rev, hw_info->sw_minor_rev);
 
        for (i = 0; i < serial->num_ports; i++) {
                port = serial->port[i];
@@ -646,7 +647,6 @@ static int whiteheat_open(struct tty_struct *tty,
                        struct usb_serial_port *port, struct file *filp)
 {
        int             retval = 0;
-       struct ktermios old_term;
 
        dbg("%s - port %d", __func__, port->number);
 
@@ -1482,7 +1482,7 @@ static void rx_data_softint(struct work_struct *work)
        struct whiteheat_private *info =
                container_of(work, struct whiteheat_private, rx_work);
        struct usb_serial_port *port = info->port;
-       struct tty_struct *tty = port->port.tty;
+       struct tty_struct *tty = tty_port_tty_get(&port->port);
        struct whiteheat_urb_wrap *wrap;
        struct urb *urb;
        unsigned long flags;
@@ -1494,7 +1494,7 @@ static void rx_data_softint(struct work_struct *work)
        spin_lock_irqsave(&info->lock, flags);
        if (info->flags & THROTTLED) {
                spin_unlock_irqrestore(&info->lock, flags);
-               return;
+               goto out;
        }
 
        list_for_each_safe(tmp, tmp2, &info->rx_urb_q) {
@@ -1514,7 +1514,7 @@ static void rx_data_softint(struct work_struct *work)
                                spin_unlock_irqrestore(&info->lock, flags);
                                tty_flip_buffer_push(tty);
                                schedule_work(&info->rx_work);
-                               return;
+                               goto out;
                        }
                        tty_insert_flip_string(tty, urb->transfer_buffer, len);
                        sent += len;
@@ -1537,6 +1537,8 @@ static void rx_data_softint(struct work_struct *work)
 
        if (sent)
                tty_flip_buffer_push(tty);
+out:
+       tty_kref_put(tty);
 }
 
 
@@ -1555,7 +1557,8 @@ static int __init whiteheat_init(void)
        retval = usb_register(&whiteheat_driver);
        if (retval)
                goto failed_usb_register;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        return 0;
 failed_usb_register:
        usb_serial_deregister(&whiteheat_device);