# 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.534 -> 1.535 # drivers/usb/serial/cyberjack.c 1.17 -> 1.18 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/28 greg@kroah.com 1.535 # USB: cyberjack driver: fixed __FUNCTION__ usages. # -------------------------------------------- # diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c Wed Aug 28 23:21:16 2002 +++ b/drivers/usb/serial/cyberjack.c Wed Aug 28 23:21:16 2002 @@ -81,7 +81,7 @@ .num_bulk_in = 1, .num_bulk_out = 1, .num_ports = 1, - .attach = cyberjack_startup, + .attach = cyberjack_startup, .shutdown = cyberjack_shutdown, .open = cyberjack_open, .close = cyberjack_close, @@ -103,7 +103,7 @@ { struct cyberjack_private *priv; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* allocate the private data structure */ serial->port->private = kmalloc(sizeof(struct cyberjack_private), GFP_KERNEL); @@ -125,7 +125,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); for (i=0; i < serial->num_ports; ++i) { /* My special items, the standard routines free my urbs */ @@ -142,7 +142,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* force low_latency on so that our tty_push actually forces * the data through, otherwise it is scheduled, and with high @@ -164,14 +164,14 @@ result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); if (result) err(" usb_submit_urb(read int) failed"); - dbg(__FUNCTION__ " - usb_submit_urb(int urb)"); + dbg("%s - usb_submit_urb(int urb)", __FUNCTION__); return result; } static void cyberjack_close (struct usb_serial_port *port, struct file *filp) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (port->serial->dev) { /* shutdown any bulk reads that might be going on */ @@ -188,16 +188,16 @@ int result; int wrexpected; - dbg(__FUNCTION__ " - port %d", port->number); - dbg(__FUNCTION__ " - from_user %d", from_user); + dbg("%s - port %d", __FUNCTION__, port->number); + dbg("%s - from_user %d", __FUNCTION__, from_user); if (count == 0) { - dbg(__FUNCTION__ " - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); return (0); } if (port->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg("%s - already writing", __FUNCTION__); return (0); } @@ -221,7 +221,7 @@ if( priv->wrfilled >= 3 ) { wrexpected = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3; - dbg(__FUNCTION__ " - expected data: %d", wrexpected); + dbg("%s - expected data: %d", __FUNCTION__, wrexpected); } else { wrexpected = sizeof(priv->wrbuf); } @@ -230,7 +230,7 @@ /* We have enough data to begin transmission */ int length; - dbg(__FUNCTION__ " - transmitting data (frame 1)"); + dbg("%s - transmitting data (frame 1)", __FUNCTION__); length = (wrexpected > port->bulk_out_size) ? port->bulk_out_size : wrexpected; memcpy (port->write_urb->transfer_buffer, priv->wrbuf, length ); @@ -248,18 +248,18 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb, GFP_ATOMIC); if (result) { - err(__FUNCTION__ " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); /* Throw away data. No better idea what to do with it. */ priv->wrfilled=0; priv->wrsent=0; return 0; } - dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent); - dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled); + dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent); + dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled); if( priv->wrsent>=priv->wrfilled ) { - dbg(__FUNCTION__ " - buffer cleaned"); + dbg("%s - buffer cleaned", __FUNCTION__); memset( priv->wrbuf, 0, sizeof(priv->wrbuf) ); priv->wrfilled=0; priv->wrsent=0; @@ -278,7 +278,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* the urb might have been killed. */ if (urb->status) @@ -311,14 +311,14 @@ /* "+=" is probably more fault tollerant than "=" */ priv->rdtodo += size; - dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo); + dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo); if( !old_rdtodo ) { port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if( result ) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); - dbg(__FUNCTION__ " - usb_submit_urb(read urb)"); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); + dbg("%s - usb_submit_urb(read urb)", __FUNCTION__); } } } @@ -333,16 +333,16 @@ int i; int result; - 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) { usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, urb->transfer_buffer); - dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status); + dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -366,15 +366,15 @@ /* Just to be sure */ if( priv->rdtodo<0 ) priv->rdtodo=0; - dbg(__FUNCTION__ " - rdtodo: %d", priv->rdtodo); + dbg("%s - rdtodo: %d", __FUNCTION__, priv->rdtodo); /* Continue to read if we have still urbs to do. */ if( priv->rdtodo /* || (urb->actual_length==port->bulk_in_endpointAddress)*/ ) { port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb, GFP_ATOMIC); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); - dbg(__FUNCTION__ " - usb_submit_urb(read urb)"); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); + dbg("%s - usb_submit_urb(read urb)", __FUNCTION__); } } @@ -384,15 +384,15 @@ struct cyberjack_private *priv = (struct cyberjack_private *)port->private; struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); - 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 write bulk status received: %d", urb->status); + dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -401,11 +401,11 @@ int length, blksize, result; if (port->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg("%s - already writing", __FUNCTION__); return; } - dbg(__FUNCTION__ " - transmitting data (frame n)"); + dbg("%s - transmitting data (frame n)", __FUNCTION__); length = ((priv->wrfilled - priv->wrsent) > port->bulk_out_size) ? port->bulk_out_size : (priv->wrfilled - priv->wrsent); @@ -426,7 +426,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb, GFP_ATOMIC); if (result) { - err(__FUNCTION__ " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); /* Throw away data. No better idea what to do with it. */ priv->wrfilled=0; priv->wrsent=0; @@ -435,13 +435,13 @@ return; } - dbg(__FUNCTION__ " - priv->wrsent=%d",priv->wrsent); - dbg(__FUNCTION__ " - priv->wrfilled=%d",priv->wrfilled); + dbg("%s - priv->wrsent=%d", __FUNCTION__,priv->wrsent); + dbg("%s - priv->wrfilled=%d", __FUNCTION__,priv->wrfilled); blksize = ((int)priv->wrbuf[2]<<8)+priv->wrbuf[1]+3; if( (priv->wrsent>=priv->wrfilled) || (priv->wrsent>=blksize) ) { - dbg(__FUNCTION__ " - buffer cleaned"); + dbg("%s - buffer cleaned", __FUNCTION__); memset( priv->wrbuf, 0, sizeof(priv->wrbuf) ); priv->wrfilled=0; priv->wrsent=0;