USB: serial: use dev_err_console in custom write paths
[cascardo/linux.git] / drivers / usb / serial / oti6858.c
index 2161d1c..343e626 100644 (file)
@@ -74,7 +74,7 @@ static struct usb_driver oti6858_driver = {
        .no_dynamic_id =        1,
 };
 
-static int debug;
+static bool debug;
 
 /* requests */
 #define        OTI6858_REQ_GET_STATUS          (USB_DIR_IN | USB_TYPE_VENDOR | 0x00)
@@ -302,7 +302,7 @@ static void send_data(struct work_struct *work)
        if (count != 0) {
                allow = kmalloc(1, GFP_KERNEL);
                if (!allow) {
-                       dev_err(&port->dev, "%s(): kmalloc failed\n",
+                       dev_err_console(port, "%s(): kmalloc failed\n",
                                        __func__);
                        return;
                }
@@ -334,7 +334,7 @@ static void send_data(struct work_struct *work)
        port->write_urb->transfer_buffer_length = count;
        result = usb_submit_urb(port->write_urb, GFP_NOIO);
        if (result != 0) {
-               dev_err(&port->dev, "%s(): usb_submit_urb() failed"
+               dev_err_console(port, "%s(): usb_submit_urb() failed"
                               " with error %d\n", __func__, result);
                priv->flags.write_urb_in_use = 0;
        }
@@ -938,7 +938,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
                port->write_urb->transfer_buffer_length = 1;
                result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
                if (result) {
-                       dev_err(&port->dev, "%s(): usb_submit_urb() failed,"
+                       dev_err_console(port, "%s(): usb_submit_urb() failed,"
                                        " error %d\n", __func__, result);
                } else {
                        return;