Commit 4c1b7bbc authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: visor driver: fixed __FUNCTION__ usages

parent 9b31edb8
......@@ -280,7 +280,7 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
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 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
*/
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 @@ static int visor_open (struct usb_serial_port *port, struct file *filp)
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 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
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 @@ static void visor_close (struct usb_serial_port *port, struct file * filp)
* 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 @@ static int visor_write (struct usb_serial_port *port, int from_user, const unsig
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 (struct usb_serial_port *port, int from_user, const unsig
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_write_room (struct usb_serial_port *port)
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 @@ static void visor_write_bulk_callback (struct urb *urb)
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 @@ static void visor_read_bulk_callback (struct urb *urb)
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 @@ static void visor_read_bulk_callback (struct urb *urb)
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 @@ static void visor_unthrottle (struct usb_serial_port *port)
{
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 @@ static int visor_probe (struct usb_serial *serial)
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 @@ static int visor_probe (struct usb_serial *serial)
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 @@ static int visor_probe (struct usb_serial *serial)
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 @@ static int visor_probe (struct usb_serial *serial)
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 @@ static int clie_3_5_startup (struct usb_serial *serial)
int result;
u8 data;
dbg(__FUNCTION__);
dbg("%s", __FUNCTION__);
/*
* Note that PEG-300 series devices expect the following two calls.
......@@ -653,11 +653,11 @@ static int clie_3_5_startup (struct usb_serial *serial)
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 @@ static int clie_3_5_startup (struct usb_serial *serial)
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 int clie_3_5_startup (struct usb_serial *serial)
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 @@ static void visor_set_termios (struct usb_serial_port *port, struct termios *old
{
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 @@ static void visor_set_termios (struct usb_serial_port *port, struct termios *old
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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment