# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.526 -> 1.527 # drivers/usb/serial/visor.c 1.36 -> 1.37 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/27 greg@kroah.com 1.527 # USB: visor driver: fixed __FUNCTION__ usages # -------------------------------------------- # diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Wed Aug 28 23:21:49 2002 +++ b/drivers/usb/serial/visor.c Wed Aug 28 23:21:49 2002 @@ -280,7 +280,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->read_urb) { /* this is needed for some brain dead Sony devices */ @@ -298,7 +298,7 @@ */ if (port->tty) port->tty->low_latency = 1; - + /* Start reading from the device */ usb_fill_bulk_urb (port->read_urb, serial->dev, usb_rcvbulkpipe (serial->dev, @@ -308,7 +308,7 @@ visor_read_bulk_callback, port); result = usb_submit_urb(port->read_urb, GFP_KERNEL); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); return result; } @@ -322,7 +322,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); serial = get_usb_serial (port, __FUNCTION__); if (!serial) @@ -333,7 +333,7 @@ * device is still here */ transfer_buffer = kmalloc (0x12, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__ " - kmalloc(%d) failed.", 0x12); + err("%s - kmalloc(%d) failed.", __FUNCTION__, 0x12); } else { /* send a shutdown message to the device */ usb_control_msg (serial->dev, @@ -358,7 +358,7 @@ unsigned char *buffer; int status; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); buffer = kmalloc (count, GFP_ATOMIC); if (!buffer) { @@ -410,7 +410,7 @@ static int visor_write_room (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* * We really can take anything the user throws at us @@ -423,7 +423,7 @@ static int visor_chars_in_buffer (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* * We can't really account for how much data we @@ -442,10 +442,10 @@ if (port_paranoia_check (port, __FUNCTION__)) return; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (urb->status) { - dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status); + dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -471,15 +471,15 @@ if (port_paranoia_check (port, __FUNCTION__)) return; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!serial) { - dbg(__FUNCTION__ " - bad serial pointer, exiting"); + dbg("%s - bad serial pointer, exiting", __FUNCTION__); return; } if (urb->status) { - dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status); + dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -508,14 +508,14 @@ visor_read_bulk_callback, port); result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; } static void visor_throttle (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); usb_unlink_urb (port->read_urb); } @@ -524,12 +524,12 @@ { int result; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); } static int visor_probe (struct usb_serial *serial) @@ -540,20 +540,20 @@ unsigned char *transfer_buffer = kmalloc (256, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__ " - kmalloc(%d) failed.", 256); + err("%s - kmalloc(%d) failed.", __FUNCTION__, 256); return -ENOMEM; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); - dbg(__FUNCTION__ " - Set config to 1"); + dbg("%s - Set config to 1", __FUNCTION__); usb_set_configuration (serial->dev, 1); /* send a get connection info request */ response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION, 0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300); if (response < 0) { - err(__FUNCTION__ " - error getting connection information"); + err("%s - error getting connection information", __FUNCTION__); } else { struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer; char *string; @@ -598,7 +598,7 @@ 0xc2, 0x0000, 0x0000, transfer_buffer, 0x14, 300); if (response < 0) { - err(__FUNCTION__ " - error getting first unknown palm command"); + err("%s - error getting first unknown palm command", __FUNCTION__); } else { usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer); } @@ -607,7 +607,7 @@ 0xc2, 0x0000, 0x0000, transfer_buffer, 0x14, 300); if (response < 0) { - err(__FUNCTION__ " - error getting second unknown palm command"); + err("%s - error getting second unknown palm command", __FUNCTION__); } else { usb_serial_debug_data (__FILE__, __FUNCTION__, 0x14, transfer_buffer); } @@ -617,7 +617,7 @@ response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE, 0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300); if (response < 0) { - err(__FUNCTION__ " - error getting bytes available request"); + err("%s - error getting bytes available request", __FUNCTION__); } kfree (transfer_buffer); @@ -642,7 +642,7 @@ int result; u8 data; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); /* * Note that PEG-300 series devices expect the following two calls. @@ -653,11 +653,11 @@ USB_REQ_GET_CONFIGURATION, USB_DIR_IN, 0, 0, &data, 1, HZ * 3); if (result < 0) { - err(__FUNCTION__ ": get config number failed: %d", result); + err("%s: get config number failed: %d", __FUNCTION__, result); return result; } if (result != 1) { - err(__FUNCTION__ ": get config number bad return length: %d", result); + err("%s: get config number bad return length: %d", __FUNCTION__, result); return -EIO; } @@ -667,11 +667,11 @@ USB_DIR_IN | USB_DT_DEVICE, 0, 0, &data, 1, HZ * 3); if (result < 0) { - err(__FUNCTION__ ": get interface number failed: %d", result); + err("%s: get interface number failed: %d", __FUNCTION__, result); return result; } if (result != 1) { - err(__FUNCTION__ ": get interface number bad return length: %d", result); + err("%s: get interface number bad return length: %d", __FUNCTION__, result); return -EIO; } @@ -680,12 +680,12 @@ static void visor_shutdown (struct usb_serial *serial) { - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); } static int visor_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg) { - dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd); + dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); return -ENOIOCTLCMD; } @@ -696,10 +696,10 @@ { unsigned int cflag; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if ((!port->tty) || (!port->tty->termios)) { - dbg(__FUNCTION__" - no tty structures"); + dbg("%s - no tty structures", __FUNCTION__); return; } @@ -708,39 +708,39 @@ if (old_termios) { if ((cflag == old_termios->c_cflag) && (RELEVANT_IFLAG(port->tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) { - dbg(__FUNCTION__ " - nothing to change..."); + dbg("%s - nothing to change...", __FUNCTION__); return; } } /* get the byte size */ switch (cflag & CSIZE) { - case CS5: dbg(__FUNCTION__ " - data bits = 5"); break; - case CS6: dbg(__FUNCTION__ " - data bits = 6"); break; - case CS7: dbg(__FUNCTION__ " - data bits = 7"); break; + case CS5: dbg("%s - data bits = 5", __FUNCTION__); break; + case CS6: dbg("%s - data bits = 6", __FUNCTION__); break; + case CS7: dbg("%s - data bits = 7", __FUNCTION__); break; default: - case CS8: dbg(__FUNCTION__ " - data bits = 8"); break; + case CS8: dbg("%s - data bits = 8", __FUNCTION__); break; } /* determine the parity */ if (cflag & PARENB) if (cflag & PARODD) - dbg(__FUNCTION__ " - parity = odd"); + dbg("%s - parity = odd", __FUNCTION__); else - dbg(__FUNCTION__ " - parity = even"); + dbg("%s - parity = even", __FUNCTION__); else - dbg(__FUNCTION__ " - parity = none"); + dbg("%s - parity = none", __FUNCTION__); /* figure out the stop bits requested */ if (cflag & CSTOPB) - dbg(__FUNCTION__ " - stop bits = 2"); + dbg("%s - stop bits = 2", __FUNCTION__); else - dbg(__FUNCTION__ " - stop bits = 1"); + dbg("%s - stop bits = 1", __FUNCTION__); /* figure out the flow control settings */ if (cflag & CRTSCTS) - dbg(__FUNCTION__ " - RTS/CTS is enabled"); + dbg("%s - RTS/CTS is enabled", __FUNCTION__); else dbg(__FUNCTION__ " - RTS/CTS is disabled");