# 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.846 -> 1.847 # drivers/usb/serial/belkin_sa.c 1.13 -> 1.14 # drivers/usb/serial/io_edgeport.c 1.19 -> 1.20 # drivers/usb/serial/io_tables.h 1.3 -> 1.4 # drivers/usb/serial/keyspan.c 1.15 -> 1.16 # drivers/usb/serial/visor.c 1.24 -> 1.25 # drivers/usb/serial/omninet.c 1.11 -> 1.12 # drivers/usb/serial/whiteheat.c 1.11 -> 1.12 # drivers/usb/serial/usbserial.c 1.20 -> 1.21 # drivers/usb/serial/empeg.c 1.15 -> 1.16 # drivers/usb/serial/digi_acceleport.c 1.12 -> 1.13 # drivers/usb/serial/kl5kusb105.c 1.1 -> 1.2 # drivers/usb/serial/keyspan_pda.c 1.8 -> 1.9 # drivers/usb/serial/mct_u232.c 1.16 -> 1.17 # drivers/usb/serial/keyspan.h 1.3 -> 1.4 # drivers/usb/serial/cyberjack.c 1.7 -> 1.8 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/14 greg@kroah.com 1.847 # USB: serial driver minor fixes # # __devinitdata fixes # __FUNCTION__ fixes for gcc 3 # -------------------------------------------- # diff -Nru a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c --- a/drivers/usb/serial/belkin_sa.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/belkin_sa.c Wed Aug 14 23:17:50 2002 @@ -112,27 +112,27 @@ { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id belkin_dockstation_table [] = { +static struct usb_device_id belkin_dockstation_table [] = { { USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id belkin_sa_table [] = { +static struct usb_device_id belkin_sa_table [] = { { USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id belkin_old_table [] = { +static struct usb_device_id belkin_old_table [] = { { USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id peracom_table [] = { +static struct usb_device_id peracom_table [] = { { USB_DEVICE(PERACOM_VID, PERACOM_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id gocom232_table [] = { +static struct usb_device_id gocom232_table [] = { { USB_DEVICE(GOHUBS_VID, GOHUBS_PID) }, { } /* Terminating entry */ }; @@ -296,7 +296,7 @@ { int i; - dbg (__FUNCTION__); + dbg ("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -314,7 +314,7 @@ { int retval = 0; - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); down (&port->sem); @@ -359,7 +359,7 @@ if (!serial) return; - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); down (&port->sem); diff -Nru a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c --- a/drivers/usb/serial/cyberjack.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/cyberjack.c Wed Aug 14 23:17:50 2002 @@ -69,7 +69,7 @@ static void cyberjack_read_bulk_callback (struct urb *urb); static void cyberjack_write_bulk_callback (struct urb *urb); -static __devinitdata struct usb_device_id id_table [] = { +static struct usb_device_id id_table [] = { { USB_DEVICE(CYBERJACK_VENDOR_ID, CYBERJACK_PRODUCT_ID) }, { } /* Terminating entry */ }; @@ -108,7 +108,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); @@ -130,7 +130,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -153,7 +153,7 @@ MOD_INC_USE_COUNT; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -181,7 +181,7 @@ result = usb_submit_urb(port->interrupt_in_urb); if (result) err(" usb_submit_urb(read int) failed"); - dbg(__FUNCTION__ " - usb_submit_urb(int urb)"); + dbg("%s - usb_submit_urb(int urb)", __FUNCTION__); } up (&port->sem); @@ -191,7 +191,7 @@ 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); down (&port->sem); @@ -220,16 +220,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); } @@ -257,7 +257,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); } @@ -266,7 +266,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 ); @@ -284,7 +284,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb); 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; @@ -292,11 +292,11 @@ 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; @@ -316,7 +316,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) @@ -349,14 +349,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); 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__); } } } @@ -371,16 +371,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; } @@ -404,15 +404,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); 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__); } } @@ -422,15 +422,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; } @@ -439,13 +439,13 @@ int length, blksize, result; if (port->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg("%s - already writing", __FUNCTION__); return; } down (&port->sem); - 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); @@ -466,7 +466,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb); 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; @@ -476,13 +476,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; diff -Nru a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c --- a/drivers/usb/serial/digi_acceleport.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/digi_acceleport.c Wed Aug 14 23:17:50 2002 @@ -483,12 +483,12 @@ { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id id_table_2 [] = { +static struct usb_device_id id_table_2 [] = { { USB_DEVICE(DIGI_VENDOR_ID, DIGI_2_ID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id id_table_4 [] = { +static struct usb_device_id id_table_4 [] = { { USB_DEVICE(DIGI_VENDOR_ID, DIGI_4_ID) }, { } /* Terminating entry */ }; @@ -689,7 +689,7 @@ spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags ); if( ret ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d", + err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret ); } @@ -778,7 +778,7 @@ spin_unlock_irqrestore( &priv->dp_port_lock, flags ); if( ret ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d", + err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__, ret, priv->dp_port_num ); } @@ -854,7 +854,7 @@ spin_unlock_irqrestore( &oob_priv->dp_port_lock, flags ); if( ret ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d", + err("%s: usb_submit_urb failed, ret=%d", __FUNCTION__, ret ); } @@ -975,7 +975,7 @@ spin_unlock_irqrestore( &priv->dp_port_lock, flags ); if( ret ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d", + err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__, ret, priv->dp_port_num ); } @@ -1334,7 +1334,7 @@ /* return length of new data written, or error */ spin_unlock_irqrestore( &priv->dp_port_lock, flags ); if( ret < 0 ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d", + err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__, ret, priv->dp_port_num ); } @@ -1357,13 +1357,13 @@ /* port and serial sanity check */ if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) { - err( __FUNCTION__ ": port or port->private is NULL, status=%d", + err("%s: port or port->private is NULL, status=%d", __FUNCTION__, urb->status ); return; } serial = port->serial; if( serial == NULL || serial->private == NULL ) { - err( __FUNCTION__ ": serial or serial->private is NULL, status=%d", urb->status ); + err("%s: serial or serial->private is NULL, status=%d", __FUNCTION__, urb->status ); return; } @@ -1420,7 +1420,7 @@ spin_unlock( &priv->dp_port_lock ); if( ret ) { - err( __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d", + err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__, ret, priv->dp_port_num ); } @@ -1689,8 +1689,7 @@ port->write_urb->dev = port->serial->dev; if( (ret=usb_submit_urb(port->read_urb)) != 0 ) { - err( - __FUNCTION__ ": usb_submit_urb failed, ret=%d, port=%d", + err("%s: usb_submit_urb failed, ret=%d, port=%d", __FUNCTION__, ret, i ); break; } @@ -1823,20 +1822,20 @@ /* port sanity check, do not resubmit if port is not valid */ if( port == NULL || (priv=(digi_port_t *)(port->private)) == NULL ) { - err( __FUNCTION__ ": port or port->private is NULL, status=%d", + err("%s: port or port->private is NULL, status=%d", __FUNCTION__, urb->status ); return; } if( port->serial == NULL || serial_paranoia_check( port->serial, __FUNCTION__ ) || port->serial->private == NULL ) { - err( __FUNCTION__ ": serial is bad or serial->private is NULL, status=%d", urb->status ); + err("%s: serial is bad or serial->private is NULL, status=%d", __FUNCTION__, urb->status ); return; } /* do not resubmit urb if it has any status error */ if( urb->status ) { - err( __FUNCTION__ ": nonzero read bulk status: status=%d, port=%d", urb->status, priv->dp_port_num ); + err("%s: nonzero read bulk status: status=%d, port=%d", __FUNCTION__, urb->status, priv->dp_port_num ); return; } @@ -1853,7 +1852,7 @@ /* continue read */ urb->dev = port->serial->dev; if( (ret=usb_submit_urb(urb)) != 0 ) { - err( __FUNCTION__ ": failed resubmitting urb, ret=%d, port=%d", + err("%s: failed resubmitting urb, ret=%d, port=%d", __FUNCTION__, ret, priv->dp_port_num ); } @@ -1894,7 +1893,7 @@ /* short/multiple packet check */ if( urb->actual_length != len + 2 ) { - err( __FUNCTION__ ": INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status ); + err("%s: INCOMPLETE OR MULTIPLE PACKET, urb->status=%d, port=%d, opcode=%d, len=%d, actual_length=%d, status=%d", __FUNCTION__, urb->status, priv->dp_port_num, opcode, len, urb->actual_length, status ); return( -1 ); } @@ -1963,9 +1962,9 @@ spin_unlock( &priv->dp_port_lock ); if( opcode == DIGI_CMD_RECEIVE_DISABLE ) { - dbg( __FUNCTION__ ": got RECEIVE_DISABLE" ); + dbg("%s: got RECEIVE_DISABLE", __FUNCTION__ ); } else if( opcode != DIGI_CMD_RECEIVE_DATA ) { - dbg( __FUNCTION__ ": unknown opcode: %d", opcode ); + dbg("%s: unknown opcode: %d", __FUNCTION__, opcode ); } return( throttled ? 1 : 0 ); diff -Nru a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c --- a/drivers/usb/serial/empeg.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/empeg.c Wed Aug 14 23:17:50 2002 @@ -106,7 +106,7 @@ static void empeg_write_bulk_callback (struct urb *urb); static void empeg_read_bulk_callback (struct urb *urb); -static __devinitdata struct usb_device_id id_table [] = { +static struct usb_device_id id_table [] = { { USB_DEVICE(EMPEG_VENDOR_ID, EMPEG_PRODUCT_ID) }, { } /* Terminating entry */ }; @@ -157,7 +157,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -189,7 +189,7 @@ result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); } @@ -206,7 +206,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) @@ -245,7 +245,7 @@ int bytes_sent = 0; int transfer_size; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf); @@ -266,14 +266,14 @@ spin_unlock_irqrestore (&write_urb_pool_lock, flags); if (urb == NULL) { - dbg (__FUNCTION__ " - no more free urbs"); + dbg("%s - no more free urbs", __FUNCTION__); goto exit; } if (urb->transfer_buffer == NULL) { urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (urb->transfer_buffer == NULL) { - err(__FUNCTION__" no more kernel memory..."); + err("%s no more kernel memory...", __FUNCTION__); goto exit; } } @@ -305,7 +305,7 @@ /* send it down the pipe */ status = usb_submit_urb(urb); if (status) { - err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status); + err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status); bytes_sent = status; break; } @@ -329,7 +329,7 @@ int i; int room = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); spin_lock_irqsave (&write_urb_pool_lock, flags); @@ -342,7 +342,7 @@ spin_unlock_irqrestore (&write_urb_pool_lock, flags); - dbg(__FUNCTION__ " - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return (room); @@ -355,7 +355,7 @@ int i; int chars = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); spin_lock_irqsave (&write_urb_pool_lock, flags); @@ -368,7 +368,7 @@ spin_unlock_irqrestore (&write_urb_pool_lock, flags); - dbg (__FUNCTION__ " - returns %d", chars); + dbg("%s - returns %d", __FUNCTION__, chars); return (chars); @@ -382,10 +382,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; } @@ -409,15 +409,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; } @@ -459,7 +459,7 @@ result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; @@ -468,7 +468,7 @@ static void empeg_throttle (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -485,7 +485,7 @@ { int result; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -494,7 +494,7 @@ result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); up (&port->sem); @@ -506,9 +506,9 @@ static int empeg_startup (struct usb_serial *serial) { - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); - dbg(__FUNCTION__ " - Set config to 1"); + dbg("%s - Set config to 1", __FUNCTION__); usb_set_configuration (serial->dev, 1); /* continue on with initialization */ @@ -521,7 +521,7 @@ { int i; - dbg (__FUNCTION__); + dbg ("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -535,7 +535,7 @@ static int empeg_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; } @@ -544,10 +544,10 @@ static void empeg_set_termios (struct usb_serial_port *port, struct termios *old_termios) { - 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; } @@ -624,7 +624,8 @@ urb->transfer_buffer = NULL; urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (!urb->transfer_buffer) { - err (__FUNCTION__ " - out of memory for urb buffers."); + err("%s - out of memory for urb buffers.", + __FUNCTION__); continue; } } diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c --- a/drivers/usb/serial/io_edgeport.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/io_edgeport.c Wed Aug 14 23:17:50 2002 @@ -593,7 +593,7 @@ struct usb_string_descriptor StringDesc; struct usb_string_descriptor *pStringDesc; - dbg(__FUNCTION__ " - USB String ID = %d", Id ); + dbg("%s - USB String ID = %d", __FUNCTION__, Id ); if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { return 0; @@ -628,7 +628,7 @@ struct usb_string_descriptor StringDesc; struct usb_string_descriptor *pStringDesc; - dbg(__FUNCTION__ " - USB String ID = %d", Id ); + dbg("%s - USB String ID = %d", __FUNCTION__, Id ); if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { return 0; @@ -763,14 +763,14 @@ int portNumber; int result; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) { return; } if (urb->status) { - dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status); + dbg("%s - nonzero control read status received: %d", __FUNCTION__, urb->status); return; } @@ -782,7 +782,7 @@ bytes_avail = data[0] | (data[1] << 8); if (bytes_avail) { edge_serial->rxBytesAvail += bytes_avail; - dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail); + dbg("%s - bytes_avail = %d, rxBytesAvail %d", __FUNCTION__, bytes_avail, edge_serial->rxBytesAvail); if ((edge_serial->rxBytesAvail > 0) && (edge_serial->read_urb->status != -EINPROGRESS)) { @@ -792,7 +792,7 @@ edge_serial->read_urb->dev = edge_serial->serial->dev; result = usb_submit_urb(edge_serial->read_urb); if (result) { - dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result); + dbg("%s - usb_submit_urb(read bulk) failed with result = %d", __FUNCTION__, result); } } } @@ -808,7 +808,7 @@ edge_port = (struct edgeport_port *)port->private; if (edge_port->open) { edge_port->txCredits += txCredits; - dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits); + dbg("%s - txcredits for port%d = %d", __FUNCTION__, portNumber, edge_port->txCredits); /* tell the tty driver that something has changed */ wake_up_interruptible(&edge_port->port->tty->write_wait); @@ -837,14 +837,14 @@ int status; __u16 raw_data_length; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (serial_paranoia_check (edge_serial->serial, __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; } @@ -856,7 +856,7 @@ /* decrement our rxBytes available by the number that we just got */ edge_serial->rxBytesAvail -= raw_data_length; - dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail); + dbg("%s - Received = %d, rxBytesAvail %d", __FUNCTION__, raw_data_length, edge_serial->rxBytesAvail); process_rcvd_data (edge_serial, data, urb->actual_length); @@ -869,7 +869,7 @@ edge_serial->read_urb->dev = edge_serial->serial->dev; status = usb_submit_urb(edge_serial->read_urb); if (status) { - err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status); + err("%s - usb_submit_urb(read bulk) failed, status = %d", __FUNCTION__, status); } } } @@ -886,14 +886,14 @@ struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; struct tty_struct *tty; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (port_paranoia_check (edge_port->port, __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); } tty = edge_port->port->tty; @@ -925,10 +925,10 @@ struct tty_struct *tty; int status = urb->status; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); CmdUrbs--; - dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs); + dbg("%s - FREE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs); /* clean up the transfer buffer */ @@ -945,7 +945,7 @@ } if (status) { - dbg(__FUNCTION__" - nonzero write bulk status received: %d", status); + dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, status); return; } @@ -982,7 +982,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (edge_port == NULL) return -ENODEV; @@ -1041,7 +1041,7 @@ * this interrupt will continue as long as the edgeport is connected */ response = usb_submit_urb (edge_serial->interrupt_read_urb); if (response) { - err(__FUNCTION__" - Error %d submitting control urb", response); + err("%s - Error %d submitting control urb", __FUNCTION__, response); } } @@ -1065,7 +1065,7 @@ response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0); if (response < 0) { - err(__FUNCTION__" - error sending open port command"); + err("%s - error sending open port command", __FUNCTION__); edge_port->openPending = FALSE; port->active = 0; port->open_count = 0; @@ -1081,7 +1081,7 @@ if (edge_port->open == FALSE) { /* open timed out */ - dbg(__FUNCTION__" - open timedout"); + dbg("%s - open timedout", __FUNCTION__); edge_port->openPending = FALSE; port->active = 0; port->open_count = 0; @@ -1097,7 +1097,7 @@ edge_port->txfifo.fifo = kmalloc (edge_port->maxTxCredits, GFP_KERNEL); if (!edge_port->txfifo.fifo) { - dbg(__FUNCTION__" - no memory"); + dbg("%s - no memory", __FUNCTION__); edge_close (port, filp); return -ENOMEM; } @@ -1106,15 +1106,15 @@ edge_port->write_urb = usb_alloc_urb (0); if (!edge_port->write_urb) { - dbg(__FUNCTION__" - no memory"); + dbg("%s - no memory", __FUNCTION__); edge_close (port, filp); return -ENOMEM; } - dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits); + dbg("%s(%d) - Initialize TX fifo to %d bytes", __FUNCTION__, port->number, edge_port->maxTxCredits); } - dbg(__FUNCTION__" exited"); + dbg("%s exited", __FUNCTION__); return 0; } @@ -1142,11 +1142,11 @@ // Did we get our Chase response if (edge_port->chaseResponsePending == FALSE) { - dbg(__FUNCTION__" - Got Chase Response"); + dbg("%s - Got Chase Response", __FUNCTION__); // did we get all of our credit back? if (edge_port->txCredits == edge_port->maxTxCredits ) { - dbg(__FUNCTION__" - Got all credits"); + dbg("%s - Got all credits", __FUNCTION__); return; } } @@ -1159,12 +1159,12 @@ wait--; if (wait == 0) { edge_port->chaseResponsePending = FALSE; - dbg(__FUNCTION__" - Chase TIMEOUT"); + dbg("%s - Chase TIMEOUT", __FUNCTION__); return; } } else { // Reset timout value back to 10 seconds - dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits); + dbg("%s - Last %d, Current %d", __FUNCTION__, lastCredits, edge_port->txCredits); wait = 10; } } @@ -1194,20 +1194,20 @@ // Is the Edgeport Buffer empty? if (lastCount == 0) { - dbg(__FUNCTION__" - TX Buffer Empty"); + dbg("%s - TX Buffer Empty", __FUNCTION__); return; } // Block the thread for a while interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout); - dbg(__FUNCTION__ " wait"); + dbg("%s wait", __FUNCTION__); if (lastCount == fifo->count) { // No activity.. count down. wait--; if (wait == 0) { - dbg(__FUNCTION__" - TIMEOUT"); + dbg("%s - TIMEOUT", __FUNCTION__); return; } } else { @@ -1232,7 +1232,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) @@ -1255,7 +1255,7 @@ /* flush and chase */ edge_port->chaseResponsePending = TRUE; - dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT"); + dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__); status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); if (status == 0) { // block until chase finished @@ -1265,7 +1265,7 @@ } /* close the port */ - dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT"); + dbg("%s - Sending IOSP_CMD_CLOSE_PORT", __FUNCTION__); send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0); //port->close = TRUE; @@ -1293,7 +1293,7 @@ } MOD_DEC_USE_COUNT; - dbg(__FUNCTION__" exited"); + dbg("%s exited", __FUNCTION__); } /***************************************************************************** @@ -1312,7 +1312,7 @@ int firsthalf; int secondhalf; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (edge_port == NULL) return -ENODEV; @@ -1323,12 +1323,12 @@ // calculate number of bytes to put in fifo copySize = min ((unsigned int)count, (edge_port->txCredits - fifo->count)); - dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room %d -- will copy %d bytes", + dbg("%s(%d) of %d byte(s) Fifo room %d -- will copy %d bytes", __FUNCTION__, port->number, count, edge_port->txCredits - fifo->count, copySize); /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */ if (copySize == 0) { - dbg (__FUNCTION__" - copySize = Zero"); + dbg("%s - copySize = Zero", __FUNCTION__); return 0; } @@ -1340,7 +1340,7 @@ bytesleft = fifo->size - fifo->head; firsthalf = min (bytesleft, copySize); - dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft); + dbg("%s - copy %d bytes of %d into fifo ", __FUNCTION__, firsthalf, bytesleft); /* now copy our data */ if (from_user) { @@ -1362,7 +1362,7 @@ secondhalf = copySize-firsthalf; if (secondhalf) { - dbg (__FUNCTION__" - copy rest of data %d", secondhalf); + dbg("%s - copy rest of data %d", __FUNCTION__, secondhalf); if (from_user) { if (copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf)) return -EFAULT; @@ -1381,7 +1381,7 @@ send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port); - dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count); + dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count); return copySize; } @@ -1411,12 +1411,12 @@ int firsthalf; int secondhalf; - dbg(__FUNCTION__"(%d)", edge_port->port->number); + dbg("%s(%d)", __FUNCTION__, edge_port->port->number); if (edge_port->write_in_progress || !edge_port->open || (fifo->count == 0)) { - dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress); + dbg("%s(%d) EXIT - fifo %d, PendingWrite = %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->write_in_progress); return; } @@ -1428,7 +1428,7 @@ // it's better to wait for more credits so we can do a larger // write. if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) { - dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits ); + dbg("%s(%d) Not enough credit - fifo %d TxCredit %d", __FUNCTION__, edge_port->port->number, fifo->count, edge_port->txCredits ); return; } @@ -1448,7 +1448,7 @@ count = fifo->count; buffer = kmalloc (count+2, GFP_KERNEL); if (buffer == NULL) { - err(__FUNCTION__" - no more kernel memory..."); + err("%s - no more kernel memory...", __FUNCTION__); edge_port->write_in_progress = FALSE; return; } @@ -1488,14 +1488,14 @@ status = usb_submit_urb(urb); if (status) { /* something went wrong */ - dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed"); + dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__); edge_port->write_in_progress = FALSE; } else { /* decrement the number of credits we have by the number we just sent */ edge_port->txCredits -= count; edge_port->icount.tx += count; } - dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count); + dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count); } @@ -1512,24 +1512,24 @@ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); int room; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (edge_port == NULL) return -ENODEV; if (edge_port->closePending == TRUE) return -ENODEV; - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!edge_port->open) { - dbg (__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return -EINVAL; } // total of both buffers is still txCredit room = edge_port->txCredits - edge_port->txfifo.count; - dbg(__FUNCTION__" - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return room; } @@ -1548,7 +1548,7 @@ struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); int num_chars; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (edge_port == NULL) return -ENODEV; @@ -1556,13 +1556,13 @@ return -ENODEV; if (!edge_port->open) { - dbg (__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return -EINVAL; } num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count; if (num_chars) { - dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars); + dbg("%s(port %d) - returns %d", __FUNCTION__, port->number, num_chars); } return num_chars; @@ -1580,13 +1580,13 @@ struct tty_struct *tty; int status; - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (edge_port == NULL) return; if (!edge_port->open) { - dbg (__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return; } @@ -1625,13 +1625,13 @@ struct tty_struct *tty; int status; - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (edge_port == NULL) return; if (!edge_port->open) { - dbg (__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return; } @@ -1669,7 +1669,7 @@ struct tty_struct *tty = port->tty; unsigned int cflag = tty->termios->c_cflag; - dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x", + dbg("%s - clfag %08x %08x iflag %08x %08x", __FUNCTION__, tty->termios->c_cflag, old_termios->c_cflag, RELEVANT_IFLAG(tty->termios->c_iflag), @@ -1680,18 +1680,18 @@ if (old_termios) { if ((cflag == old_termios->c_cflag) && (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) { - dbg(__FUNCTION__" - nothing to change"); + dbg("%s - nothing to change", __FUNCTION__); return; } } - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (edge_port == NULL) return; if (!edge_port->open) { - dbg (__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return; } @@ -1718,7 +1718,7 @@ if (edge_port->maxTxCredits == edge_port->txCredits && edge_port->txfifo.count == 0) { - dbg(__FUNCTION__" -- Empty"); + dbg("%s -- Empty", __FUNCTION__); result = TIOCSER_TEMT; } @@ -1734,7 +1734,7 @@ result = tty->read_cnt; - dbg(__FUNCTION__"(%d) = %d", edge_port->port->number, result); + dbg("%s(%d) = %d", __FUNCTION__, edge_port->port->number, result); if (copy_to_user(value, &result, sizeof(int))) return -EFAULT; //return 0; @@ -1799,7 +1799,7 @@ | ((msr & MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ - dbg(__FUNCTION__" -- %x", result); + dbg("%s -- %x", __FUNCTION__, result); if (copy_to_user(value, &result, sizeof(int))) return -EFAULT; @@ -1850,40 +1850,40 @@ struct serial_icounter_struct icount; - dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd); + dbg("%s - port %d, cmd = 0x%x", __FUNCTION__, port->number, cmd); switch (cmd) { // return number of bytes available case TIOCINQ: - dbg(__FUNCTION__" (%d) TIOCINQ", port->number); + dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); return get_number_bytes_avail(edge_port, (unsigned int *) arg); break; case TIOCSERGETLSR: - dbg(__FUNCTION__" (%d) TIOCSERGETLSR", port->number); + dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); return get_lsr_info(edge_port, (unsigned int *) arg); return 0; case TIOCMBIS: case TIOCMBIC: case TIOCMSET: - dbg(__FUNCTION__" (%d) TIOCMSET/TIOCMBIC/TIOCMSET", port->number); + dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, port->number); return set_modem_info(edge_port, cmd, (unsigned int *) arg); case TIOCMGET: - dbg(__FUNCTION__" (%d) TIOCMGET", port->number); + dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); return get_modem_info(edge_port, (unsigned int *) arg); case TIOCGSERIAL: - dbg(__FUNCTION__" (%d) TIOCGSERIAL", port->number); + dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); return get_serial_info(edge_port, (struct serial_struct *) arg); case TIOCSSERIAL: - dbg(__FUNCTION__" (%d) TIOCSSERIAL", port->number); + dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); break; case TIOCMIWAIT: - dbg(__FUNCTION__" (%d) TIOCMIWAIT", port->number); + dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number); cprev = edge_port->icount; while (1) { interruptible_sleep_on(&edge_port->delta_msr_wait); @@ -1919,7 +1919,7 @@ icount.brk = cnow.brk; icount.buf_overrun = cnow.buf_overrun; - dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d", port->number, icount.rx, icount.tx ); + dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, port->number, icount.rx, icount.tx ); if (copy_to_user((void *)arg, &icount, sizeof(icount))) return -EFAULT; return 0; @@ -1941,7 +1941,7 @@ /* flush and chase */ edge_port->chaseResponsePending = TRUE; - dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT"); + dbg("%s - Sending IOSP_CMD_CHASE_PORT", __FUNCTION__); status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); if (status == 0) { // block until chase finished @@ -1951,14 +1951,14 @@ } if (break_state == -1) { - dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK"); + dbg("%s - Sending IOSP_CMD_SET_BREAK", __FUNCTION__); status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0); } else { - dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK"); + dbg("%s - Sending IOSP_CMD_CLEAR_BREAK", __FUNCTION__); status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0); } if (status) { - dbg(__FUNCTION__" - error sending break set/clear command."); + dbg("%s - error sending break set/clear command.", __FUNCTION__); } return; @@ -1978,14 +1978,14 @@ __u16 rxLen; int i; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); lastBufferLength = bufferLength + 1; while (bufferLength > 0) { /* failsafe incase we get a message that we don't understand */ if (lastBufferLength == bufferLength) { - dbg(__FUNCTION__" - stuck in loop, exiting it."); + dbg("%s - stuck in loop, exiting it.", __FUNCTION__); break; } lastBufferLength = bufferLength; @@ -2007,7 +2007,7 @@ ++buffer; --bufferLength; - dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2); + dbg("%s - Hdr1=%02X Hdr2=%02X", __FUNCTION__, edge_serial->rxHeader1, edge_serial->rxHeader2); // Process depending on whether this header is // data or status @@ -2038,7 +2038,7 @@ edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1); edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2); - dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining); + dbg("%s - Data for Port %u Len %u", __FUNCTION__, edge_serial->rxPort, edge_serial->rxBytesRemaining); //ASSERT( DevExt->RxPort < DevExt->NumPorts ); //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH ); @@ -2072,7 +2072,7 @@ if (edge_port->open) { tty = edge_port->port->tty; if (tty) { - dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort); + dbg("%s - Sending %d bytes to TTY for port %d", __FUNCTION__, rxLen, edge_serial->rxPort); for (i = 0; i < rxLen ; ++i) { /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ if(tty->flip.count >= TTY_FLIPBUF_SIZE) { @@ -2125,17 +2125,17 @@ } edge_port = (struct edgeport_port *)port->private; if (edge_port == NULL) { - err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort); + err("%s - edge_port == NULL for port %d", __FUNCTION__, edge_serial->rxPort); return; } - dbg(__FUNCTION__" - port %d", edge_serial->rxPort); + dbg("%s - port %d", __FUNCTION__, edge_serial->rxPort); if (code == IOSP_EXT_STATUS) { switch (byte2) { case IOSP_EXT_STATUS_CHASE_RSP: // we want to do EXT status regardless of port open/closed - dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 ); + dbg("%s - Port %u EXT CHASE_RSP Data = %02x", __FUNCTION__, edge_serial->rxPort, byte3 ); // Currently, the only EXT_STATUS is Chase, so process here instead of one more call // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do. // Also, we currently clear flag and close the port regardless of content of above's Byte3. @@ -2146,7 +2146,7 @@ return; case IOSP_EXT_STATUS_RX_CHECK_RSP: - dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 ); + dbg("%s ========== Port %u CHECK_RSP Sequence = %02x =============\n", __FUNCTION__, edge_serial->rxPort, byte3 ); //Port->RxCheckRsp = TRUE; return; } @@ -2155,7 +2155,7 @@ if (code == IOSP_STATUS_OPEN_RSP) { edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3); edge_port->maxTxCredits = edge_port->txCredits; - dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits); + dbg("%s - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", __FUNCTION__, edge_serial->rxPort, byte2, edge_port->txCredits); handle_new_msr (edge_port, byte2); /* send the current line settings to the port so we are in sync with any further termios calls */ @@ -2178,23 +2178,23 @@ switch (code) { // Not currently sent by Edgeport case IOSP_STATUS_LSR: - dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2); + dbg("%s - Port %u LSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2); handle_new_lsr (edge_port, FALSE, byte2, 0); break; case IOSP_STATUS_LSR_DATA: - dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3); + dbg("%s - Port %u LSR Status = %02x, Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3); // byte2 is LSR Register // byte3 is broken data byte handle_new_lsr (edge_port, TRUE, byte2, byte3); break; // // case IOSP_EXT_4_STATUS: - // dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3); + // dbg("%s - Port %u LSR Status = %02x Data = %02x", __FUNCTION__, edge_serial->rxPort, byte2, byte3); // break; // case IOSP_STATUS_MSR: - dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2); + dbg("%s - Port %u MSR Status = %02x", __FUNCTION__, edge_serial->rxPort, byte2); // Process this new modem status and generate appropriate // events, etc, based on the new status. This routine @@ -2203,7 +2203,7 @@ break; default: - dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code); + dbg("%s - Unrecognized IOSP status code %u\n", __FUNCTION__, code); break; } @@ -2219,7 +2219,7 @@ { struct async_icount *icount; - dbg(__FUNCTION__" %02x", newMsr); + dbg("%s %02x", __FUNCTION__, newMsr); if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) { icount = &edge_port->icount; @@ -2256,7 +2256,7 @@ __u8 newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); struct async_icount *icount; - dbg(__FUNCTION__" - %02x", newLsr); + dbg("%s - %02x", __FUNCTION__, newLsr); edge_port->shadowLSR = lsr; @@ -2307,11 +2307,11 @@ __u16 current_length; unsigned char *transfer_buffer; -// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); +// dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); transfer_buffer = kmalloc (64, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); return -ENOMEM; } @@ -2323,7 +2323,7 @@ } else { current_length = length; } -// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length); +// dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); memcpy (transfer_buffer, data, current_length); result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, 0x40, addr, extAddr, transfer_buffer, current_length, 300); @@ -2352,11 +2352,11 @@ __u16 current_length; unsigned char *transfer_buffer; -// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); +// dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); transfer_buffer = kmalloc (64, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); return -ENOMEM; } @@ -2368,7 +2368,7 @@ } else { current_length = length; } -// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length); +// dbg("%s - writing %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); memcpy (transfer_buffer, data, current_length); result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, 0x40, addr, extAddr, transfer_buffer, current_length, 300); @@ -2397,11 +2397,11 @@ __u16 current_length; unsigned char *transfer_buffer; - dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); + dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, length); transfer_buffer = kmalloc (64, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 64); return -ENOMEM; } @@ -2413,7 +2413,7 @@ } else { current_length = length; } -// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length); +// dbg("%s - %x, %x, %d", __FUNCTION__, extAddr, addr, current_length); result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, 0xC0, addr, extAddr, transfer_buffer, current_length, 300); if (result < 0) @@ -2440,11 +2440,11 @@ int length = 0; int status = 0; - dbg(__FUNCTION__" - %d, %d", command, param); + dbg("%s - %d, %d", __FUNCTION__, command, param); buffer = kmalloc (10, GFP_KERNEL); if (!buffer) { - err(__FUNCTION__" - kmalloc(%d) failed.\n", 10); + err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 10); return -ENOMEM; } @@ -2483,7 +2483,7 @@ return -ENOMEM; CmdUrbs++; - dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs); + dbg("%s - ALLOCATE URB %p (outstanding %d)", __FUNCTION__, urb, CmdUrbs); FILL_BULK_URB (urb, edge_serial->serial->dev, usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint), @@ -2497,7 +2497,7 @@ if (status) { /* something went wrong */ - dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed"); + dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__); usb_unlink_urb (urb); usb_free_urb (urb); return status; @@ -2512,7 +2512,7 @@ if (edge_port->commandPending == TRUE) { /* command timed out */ - dbg(__FUNCTION__" - command timed out"); + dbg("%s - command timed out", __FUNCTION__); status = -EINVAL; } #endif @@ -2534,18 +2534,18 @@ int status; unsigned char number = edge_port->port->number - edge_port->port->serial->minor; - dbg(__FUNCTION__" - port = %d, baud = %d", edge_port->port->number, baudRate); + dbg("%s - port = %d, baud = %d", __FUNCTION__, edge_port->port->number, baudRate); status = calc_baud_rate_divisor (baudRate, &divisor); if (status) { - err(__FUNCTION__" - bad baud rate"); + err("%s - bad baud rate", __FUNCTION__); return status; } // Alloc memory for the string of commands. cmdBuffer = kmalloc (0x100, GFP_KERNEL); if (!cmdBuffer) { - err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100); + err("%s - kmalloc(%d) failed.\n", __FUNCTION__, 0x100); return -ENOMEM; } currCmd = cmdBuffer; @@ -2583,7 +2583,7 @@ __u16 round; - dbg(__FUNCTION__" - %d", baudrate); + dbg("%s - %d", __FUNCTION__, baudrate); for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) { if ( DivisorTable[i].BaudRate == baudrate ) { @@ -2607,7 +2607,7 @@ } *divisor = custom; - dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom); + dbg("%s - Baud %d = %d\n", __FUNCTION__, baudrate, custom); return 0; } @@ -2626,7 +2626,7 @@ unsigned long cmdLen = 0; int status; - dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue); + dbg("%s - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", __FUNCTION__, regValue); // Alloc memory for the string of commands. cmdBuffer = kmalloc (0x10, GFP_KERNEL); @@ -2669,50 +2669,50 @@ __u8 txFlow; int status; - dbg(__FUNCTION__" - port %d", edge_port->port->number); + dbg("%s - port %d", __FUNCTION__, edge_port->port->number); if ((!edge_port->open) && (!edge_port->openPending)) { - dbg(__FUNCTION__" - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return; } tty = edge_port->port->tty; if ((!tty) || (!tty->termios)) { - dbg(__FUNCTION__" - no tty structures"); + dbg("%s - no tty structures", __FUNCTION__); return; } cflag = tty->termios->c_cflag; switch (cflag & CSIZE) { - case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg(__FUNCTION__" - data bits = 5"); break; - case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg(__FUNCTION__" - data bits = 6"); break; - case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg(__FUNCTION__" - data bits = 7"); break; + case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg("%s - data bits = 5", __FUNCTION__); break; + case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg("%s - data bits = 6", __FUNCTION__); break; + case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg("%s - data bits = 7", __FUNCTION__); break; default: - case CS8: lData = LCR_BITS_8; dbg(__FUNCTION__" - data bits = 8"); break; + case CS8: lData = LCR_BITS_8; dbg("%s - data bits = 8", __FUNCTION__); break; } lParity = LCR_PAR_NONE; if (cflag & PARENB) { if (cflag & PARODD) { lParity = LCR_PAR_ODD; - dbg(__FUNCTION__" - parity = odd"); + dbg("%s - parity = odd", __FUNCTION__); } else { lParity = LCR_PAR_EVEN; - dbg(__FUNCTION__" - parity = even"); + dbg("%s - parity = even", __FUNCTION__); } } else { - dbg(__FUNCTION__" - parity = none"); + dbg("%s - parity = none", __FUNCTION__); } if (cflag & CSTOPB) { lStop = LCR_STOP_2; - dbg(__FUNCTION__" - stop bits = 2"); + dbg("%s - stop bits = 2", __FUNCTION__); } else { lStop = LCR_STOP_1; - dbg(__FUNCTION__" - stop bits = 1"); + dbg("%s - stop bits = 1", __FUNCTION__); } /* figure out the flow control settings */ @@ -2720,9 +2720,9 @@ if (cflag & CRTSCTS) { rxFlow |= IOSP_RX_FLOW_RTS; txFlow |= IOSP_TX_FLOW_CTS; - dbg(__FUNCTION__" - RTS/CTS is enabled"); + dbg("%s - RTS/CTS is enabled", __FUNCTION__); } else { - dbg(__FUNCTION__" - RTS/CTS is disabled"); + dbg("%s - RTS/CTS is disabled", __FUNCTION__); } /* if we are implementing XON/XOFF, set the start and stop character in the device */ @@ -2736,17 +2736,17 @@ /* if we are implementing INBOUND XON/XOFF */ if (I_IXOFF(tty)) { rxFlow |= IOSP_RX_FLOW_XON_XOFF; - dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char); + dbg("%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char); } else { - dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled"); + dbg("%s - INBOUND XON/XOFF is disabled", __FUNCTION__); } /* if we are implementing OUTBOUND XON/XOFF */ if (I_IXON(tty)) { txFlow |= IOSP_TX_FLOW_XON_XOFF; - dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char); + dbg("%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, start_char, stop_char); } else { - dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled"); + dbg("%s - OUTBOUND XON/XOFF is disabled", __FUNCTION__); } } @@ -2783,7 +2783,7 @@ baud = 9600; } - dbg(__FUNCTION__ " - baud rate = %d", baud); + dbg("%s - baud rate = %d", __FUNCTION__, baud); status = send_cmd_write_baud_rate (edge_port, baud); return; @@ -2958,7 +2958,7 @@ /* create our private serial structure */ edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL); if (edge_serial == NULL) { - err(__FUNCTION__" - Out of memory"); + err("%s - Out of memory", __FUNCTION__); return -ENOMEM; } memset (edge_serial, 0, sizeof(struct edgeport_serial)); @@ -2985,22 +2985,23 @@ /* set the number of ports from the manufacturing description */ /* serial->num_ports = serial->product_info.NumPorts; */ if (edge_serial->product_info.NumPorts != serial->num_ports) { - warn(__FUNCTION__ " - Device Reported %d serial ports vs core " + warn("%s - Device Reported %d serial ports vs core " "thinking we have %d ports, email greg@kroah.com this info.", - edge_serial->product_info.NumPorts, serial->num_ports); + __FUNCTION__, edge_serial->product_info.NumPorts, + serial->num_ports); } - dbg(__FUNCTION__ " - time 1 %ld", jiffies); + dbg("%s - time 1 %ld", __FUNCTION__, jiffies); /* now load the application firmware into this device */ load_application_firmware (edge_serial); - dbg(__FUNCTION__ " - time 2 %ld", jiffies); + dbg("%s - time 2 %ld", __FUNCTION__, jiffies); /* Check current Edgeport EEPROM and update if necessary */ update_edgeport_E2PROM (edge_serial); - dbg(__FUNCTION__ " - time 3 %ld", jiffies); + dbg("%s - time 3 %ld", __FUNCTION__, jiffies); /* set the configuration to use #1 */ // dbg("set_configuration 1"); @@ -3013,7 +3014,7 @@ for (i = 0; i < serial->num_ports; ++i) { edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL); if (edge_port == NULL) { - err(__FUNCTION__" - Out of memory"); + err("%s - Out of memory", __FUNCTION__); return -ENOMEM; } memset (edge_port, 0, sizeof(struct edgeport_port)); @@ -3034,7 +3035,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { diff -Nru a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h --- a/drivers/usb/serial/io_tables.h Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/io_tables.h Wed Aug 14 23:17:50 2002 @@ -14,12 +14,12 @@ #ifndef IO_TABLES_H #define IO_TABLES_H -static __devinitdata struct usb_device_id edgeport_1port_id_table [] = { +static struct usb_device_id edgeport_1port_id_table [] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT) }, { } }; -static __devinitdata struct usb_device_id edgeport_2port_id_table [] = { +static struct usb_device_id edgeport_2port_id_table [] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_2I) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_421) }, @@ -33,7 +33,7 @@ { } }; -static __devinitdata struct usb_device_id edgeport_4port_id_table [] = { +static struct usb_device_id edgeport_4port_id_table [] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_RAPIDPORT_4) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_4T) }, @@ -50,7 +50,7 @@ { } }; -static __devinitdata struct usb_device_id edgeport_8port_id_table [] = { +static struct usb_device_id edgeport_8port_id_table [] = { { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU) }, { USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_EDGEPORT_8I) }, diff -Nru a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c --- a/drivers/usb/serial/keyspan.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/keyspan.c Wed Aug 14 23:17:50 2002 @@ -262,7 +262,7 @@ const keyspan_device_details *d_details; unsigned int cflag; - dbg(__FUNCTION__ ".\n"); + dbg("%s.\n", __FUNCTION__); p_priv = (struct keyspan_port_private *)(port->private); d_details = p_priv->device_details; @@ -347,7 +347,7 @@ d_details = p_priv->device_details; #if 0 - dbg(__FUNCTION__ " for port %d (%d chars [%x]), flip=%d\n", + dbg("%s for port %d (%d chars [%x]), flip=%d\n", __FUNCTION__, port->number, count, buf[0], p_priv->out_flip); #endif @@ -361,11 +361,11 @@ /* Check we have a valid urb/endpoint before we use it... */ if ((this_urb = p_priv->out_urbs[flip]) == 0) { /* no bulk out, so return 0 bytes written */ - dbg(__FUNCTION__ " no output urb :(\n"); + dbg("%s no output urb :(\n", __FUNCTION__); return count; } - dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe)); + dbg("%s endpoint %d\n", __FUNCTION__, usb_pipeendpoint(this_urb->pipe)); if (this_urb->status == -EINPROGRESS) { if (this_urb->transfer_flags & USB_ASYNC_UNLINK) @@ -420,7 +420,7 @@ endpoint = usb_pipeendpoint(urb->pipe); if (urb->status) { - dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n", + dbg("%s nonzero status: %x on endpoint %d.\n", __FUNCTION__, urb->status, endpoint); return; } @@ -453,7 +453,7 @@ /* Resubmit urb so we continue receiving */ urb->dev = port->serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err); + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } return; } @@ -466,7 +466,7 @@ port = (struct usb_serial_port *) urb->context; p_priv = (struct keyspan_port_private *)(port->private); - dbg (__FUNCTION__ " urb %d\n", urb == p_priv->out_urbs[1]); + dbg("%s urb %d\n", __FUNCTION__, urb == p_priv->out_urbs[1]); if (port->active) { queue_task(&port->tqueue, &tq_immediate); @@ -489,7 +489,7 @@ p_priv = (struct keyspan_port_private *)(port->private); if (p_priv->resend_cont) { - dbg (__FUNCTION__ " sending setup\n"); + dbg("%s sending setup\n", __FUNCTION__); keyspan_usa26_send_setup(port->serial, port, 0); } } @@ -506,18 +506,18 @@ serial = (struct usb_serial *) urb->context; if (urb->status) { - dbg(__FUNCTION__ " nonzero status: %x\n", urb->status); + dbg("%s nonzero status: %x\n", __FUNCTION__, urb->status); return; } if (urb->actual_length != 9) { - dbg(__FUNCTION__ " %d byte report??\n", urb->actual_length); + dbg("%s %d byte report??\n", __FUNCTION__, urb->actual_length); goto exit; } msg = (keyspan_usa26_portStatusMessage *)data; #if 0 - dbg(__FUNCTION__ " port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n", + dbg("%s port status: port %d cts %d dcd %d dsr %d ri %d toff %d txoff %d rxen %d cr %d\n", __FUNCTION__, msg->port, msg->hskia_cts, msg->gpia_dcd, msg->dsr, msg->ri, msg->_txOff, msg->_txXoff, msg->rxEnabled, msg->controlResponse); #endif @@ -552,7 +552,7 @@ /* Resubmit urb so we continue receiving */ urb->dev = serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err); + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } } @@ -582,9 +582,9 @@ do { if (urb->status) { - dbg(__FUNCTION__ "nonzero status: %x on endpoint -%d.\n", - urb->status, usb_pipeendpoint(urb->pipe)); + dbg("%s nonzero status: %x on endpoint %d.\n", + __FUNCTION__ , urb->status, + usb_pipeendpoint(urb->pipe)); return; } @@ -603,7 +603,7 @@ /* Resubmit urb so we continue receiving */ urb->dev = port->serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } p_priv->in_flip ^= 1; @@ -626,7 +626,7 @@ p_priv = (struct keyspan_port_private *)(port->private); if (p_priv->resend_cont) { - dbg (__FUNCTION__ " sending setup\n"); + dbg("%s sending setup\n", __FUNCTION__); keyspan_usa28_send_setup(port->serial, port, 0); } } @@ -644,16 +644,16 @@ serial = (struct usb_serial *) urb->context; if (urb->status) { - dbg(__FUNCTION__ " nonzero status: %x\n", urb->status); + dbg("%s nonzero status: %x\n", __FUNCTION__, urb->status); return; } if (urb->actual_length != sizeof(struct keyspan_usa28_portStatusMessage)) { - dbg(__FUNCTION__ " bad length %d\n", urb->actual_length); + dbg("%s bad length %d\n", __FUNCTION__, urb->actual_length); goto exit; } - /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x %x\n", + /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x %x\n", __FUNCTION__, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10], data[11]);*/ @@ -688,7 +688,7 @@ /* Resubmit urb so we continue receiving */ urb->dev = serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err); + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } } @@ -713,7 +713,7 @@ p_priv = (struct keyspan_port_private *)(port->private); if (p_priv->resend_cont) { - dbg (__FUNCTION__ " sending setup\n"); + dbg("%s sending setup\n", __FUNCTION__); keyspan_usa49_send_setup(serial, port, 0); break; } @@ -737,16 +737,16 @@ serial = (struct usb_serial *) urb->context; if (urb->status) { - dbg(__FUNCTION__ " nonzero status: %x\n", urb->status); + dbg("%s nonzero status: %x\n", __FUNCTION__, urb->status); return; } if (urb->actual_length != sizeof(struct keyspan_usa49_portStatusMessage)) { - dbg(__FUNCTION__ " bad length %d\n", urb->actual_length); + dbg("%s bad length %d\n", __FUNCTION__, urb->actual_length); goto exit; } - /*dbg(__FUNCTION__ " %x %x %x %x %x %x %x %x %x %x %x\n", + /*dbg("%s %x %x %x %x %x %x %x %x %x %x %x\n", __FUNCTION__, data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], data[10]);*/ @@ -781,7 +781,7 @@ urb->dev = serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err); + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } } @@ -803,7 +803,7 @@ endpoint = usb_pipeendpoint(urb->pipe); if (urb->status) { - dbg(__FUNCTION__ "nonzero status: %x on endpoint %d.\n", + dbg("%s nonzero status: %x on endpoint %d.\n", __FUNCTION__, urb->status, endpoint); return; } @@ -836,7 +836,7 @@ /* Resubmit urb so we continue receiving */ urb->dev = port->serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ "resubmit read urb failed. (%d)\n", err); + dbg("%s resubmit read urb failed. (%d)\n", __FUNCTION__, err); } } @@ -900,7 +900,7 @@ continue; urb->dev = serial->dev; if ((err = usb_submit_urb(urb)) != 0) { - dbg(__FUNCTION__ " submit urb %d failed (%d)\n", i, err); + dbg("%s submit urb %d failed (%d)\n", __FUNCTION__, i, err); } } @@ -1074,10 +1074,10 @@ if (endpoint == -1) return NULL; /* endpoint not needed */ - dbg (__FUNCTION__ " alloc for endpoint %d.\n", endpoint); + dbg("%s alloc for endpoint %d.\n", __FUNCTION__, endpoint); urb = usb_alloc_urb(0); /* No ISO */ if (urb == NULL) { - dbg (__FUNCTION__ " alloc for endpoint %d failed.\n", endpoint); + dbg("%s alloc for endpoint %d failed.\n", __FUNCTION__, endpoint); return NULL; } @@ -1237,7 +1237,7 @@ *rate_hi = (u8) ((cnt >> 8) & 0xff); } if (rate_low && rate_hi) { - dbg (__FUNCTION__ " %d %02x %02x.", baud_rate, *rate_hi, *rate_low); + dbg("%s %d %02x %02x.", __FUNCTION__, baud_rate, *rate_hi, *rate_low); } return (KEYSPAN_BAUD_RATE_OK); @@ -1255,7 +1255,7 @@ u8 best_prescaler; int i; - dbg (__FUNCTION__ " %d.\n", baud_rate); + dbg("%s %d.\n", __FUNCTION__, baud_rate); /* prevent divide by zero */ if( (b16 = baud_rate * 16L) == 0) { @@ -1305,7 +1305,7 @@ } if (prescaler) { *prescaler = best_prescaler; - /* dbg(__FUNCTION__ " %d %d", *prescaler, div); */ + /* dbg("%s %d %d", __FUNCTION__, *prescaler, div); */ } return (KEYSPAN_BAUD_RATE_OK); } @@ -1331,17 +1331,17 @@ outcont_urb = d_details->outcont_endpoints[port->number]; this_urb = p_priv->outcont_urb; - dbg(__FUNCTION__ " endpoint %d\n", usb_pipeendpoint(this_urb->pipe)); + dbg("%s endpoint %d\n", __FUNCTION__, usb_pipeendpoint(this_urb->pipe)); /* Make sure we have an urb then send the message */ if (this_urb == NULL) { - dbg(__FUNCTION__ " oops no urb.\n"); + dbg("%s oops no urb.\n", __FUNCTION__); return -1; } p_priv->resend_cont = 1; if (this_urb->status == -EINPROGRESS) { - /* dbg (__FUNCTION__ " already writing"); */ + /* dbg("%s already writing", __FUNCTION__); */ return(-1); } @@ -1354,7 +1354,7 @@ if (d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk, &msg.baudHi, &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) { - dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n", + dbg("%s Invalid baud rate %d requested, using 9600.\n", __FUNCTION__, p_priv->baud); msg.baudLo = 0; msg.baudHi = 125; /* Values for 9600 baud */ @@ -1433,11 +1433,11 @@ this_urb->dev = serial->dev; if ((err = usb_submit_urb(this_urb)) != 0) { - dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err); + dbg("%s usb_submit_urb(setup) failed (%d)\n", __FUNCTION__, err); } #if 0 else { - dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)", + dbg("%s usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__, outcont_urb, this_urb->transfer_buffer_length, usb_pipeendpoint(this_urb->pipe)); } @@ -1463,13 +1463,13 @@ /* only do something if we have a bulk out endpoint */ if ((this_urb = p_priv->outcont_urb) == NULL) { - dbg(__FUNCTION__ " oops no urb.\n"); + dbg("%s oops no urb.\n", __FUNCTION__); return -1; } p_priv->resend_cont = 1; if (this_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " already writing\n"); + dbg("%s already writing\n", __FUNCTION__); return(-1); } @@ -1478,7 +1478,7 @@ msg.setBaudRate = 1; if (keyspan_usa19_calc_baud(p_priv->baud, d_details->baudclk, &msg.baudHi, &msg.baudLo, NULL) == KEYSPAN_INVALID_BAUD_RATE ) { - dbg(__FUNCTION__ "Invalid baud rate requested %d.", p_priv->baud); + dbg("%s Invalid baud rate requested %d.", __FUNCTION__, p_priv->baud); msg.baudLo = 0xff; msg.baudHi = 0xb2; /* Values for 9600 baud */ } @@ -1519,11 +1519,11 @@ this_urb->dev = serial->dev; if ((err = usb_submit_urb(this_urb)) != 0) { - dbg(__FUNCTION__ " usb_submit_urb(setup) failed\n"); + dbg("%s usb_submit_urb(setup) failed\n", __FUNCTION__); } #if 0 else { - dbg(__FUNCTION__ " usb_submit_urb(setup) OK %d bytes", + dbg("%s usb_submit_urb(setup) OK %d bytes", __FUNCTION__, this_urb->transfer_buffer_length); } #endif @@ -1556,17 +1556,17 @@ /* Work out which port within the device is being setup */ device_port = port->number - port->serial->minor; - dbg(__FUNCTION__ " endpoint %d port %d (%d)\n", usb_pipeendpoint(this_urb->pipe), port->number, device_port); + dbg("%s endpoint %d port %d (%d)\n", __FUNCTION__, usb_pipeendpoint(this_urb->pipe), port->number, device_port); /* Make sure we have an urb then send the message */ if (this_urb == NULL) { - dbg(__FUNCTION__ " oops no urb for port %d.\n", port->number); + dbg("%s oops no urb for port %d.\n", __FUNCTION__, port->number); return -1; } p_priv->resend_cont = 1; if (this_urb->status == -EINPROGRESS) { - /* dbg (__FUNCTION__ " already writing"); */ + /* dbg("%s already writing", __FUNCTION__); */ return(-1); } @@ -1582,7 +1582,7 @@ if (d_details->calculate_baud_rate (p_priv->baud, d_details->baudclk, &msg.baudHi, &msg.baudLo, &msg.prescaler) == KEYSPAN_INVALID_BAUD_RATE ) { - dbg(__FUNCTION__ "Invalid baud rate %d requested, using 9600.\n", + dbg("%s Invalid baud rate %d requested, using 9600.\n", __FUNCTION__, p_priv->baud); msg.baudLo = 0; msg.baudHi = 125; /* Values for 9600 baud */ @@ -1647,11 +1647,11 @@ this_urb->dev = serial->dev; if ((err = usb_submit_urb(this_urb)) != 0) { - dbg(__FUNCTION__ " usb_submit_urb(setup) failed (%d)\n", err); + dbg("%s usb_submit_urb(setup) failed (%d)\n", __FUNCTION__, err); } #if 0 else { - dbg(__FUNCTION__ " usb_submit_urb(%d) OK %d bytes (end %d)", + dbg("%s usb_submit_urb(%d) OK %d bytes (end %d)", __FUNCTION__, outcont_urb, this_urb->transfer_buffer_length, usb_pipeendpoint(this_urb->pipe)); } @@ -1698,7 +1698,7 @@ if (d_details->product_id == serial->dev->descriptor.idProduct) break; if (d_details == NULL) { - printk(KERN_ERR __FUNCTION__ ": unknown product id %x\n", + printk(KERN_ERR "%s: unknown product id %x\n", __FUNCTION__, serial->dev->descriptor.idProduct); return 1; } @@ -1707,7 +1707,7 @@ serial->private = kmalloc(sizeof(struct keyspan_serial_private), GFP_KERNEL); if (!serial->private) { - dbg(__FUNCTION__ "kmalloc for keyspan_serial_private failed.\n"); + dbg("%s kmalloc for keyspan_serial_private failed.\n", __FUNCTION__); return (1); } memset(serial->private, 0, sizeof(struct keyspan_serial_private)); @@ -1721,7 +1721,7 @@ port->private = kmalloc(sizeof(struct keyspan_port_private), GFP_KERNEL); if (!port->private) { - dbg(__FUNCTION__ "kmalloc for keyspan_port_private (%d) failed!.\n", i); + dbg("%s kmalloc for keyspan_port_private (%d) failed!.\n", __FUNCTION__, i); return (1); } memset(port->private, 0, sizeof(struct keyspan_port_private)); @@ -1733,7 +1733,7 @@ s_priv->instat_urb->dev = serial->dev; if ((err = usb_submit_urb(s_priv->instat_urb)) != 0) { - dbg(__FUNCTION__ " submit instat urb failed %d\n", err); + dbg("%s submit instat urb failed %d\n", __FUNCTION__, err); } return (0); diff -Nru a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h --- a/drivers/usb/serial/keyspan.h Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/keyspan.h Wed Aug 14 23:17:50 2002 @@ -372,77 +372,77 @@ ID pattern. But, for now, it looks like we need slightly different behavior for each match. */ -static __devinitdata struct usb_device_id keyspan_usa18x_pre_ids[] = { +static struct usb_device_id keyspan_usa18x_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa19_pre_ids[] = { +static struct usb_device_id keyspan_usa19_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa19w_pre_ids[] = { +static struct usb_device_id keyspan_usa19w_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28_pre_ids[] = { +static struct usb_device_id keyspan_usa28_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28x_pre_ids[] = { +static struct usb_device_id keyspan_usa28x_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28xa_pre_ids[] = { +static struct usb_device_id keyspan_usa28xa_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28xb_pre_ids[] = { +static struct usb_device_id keyspan_usa28xb_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xb_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa49w_pre_ids[] = { +static struct usb_device_id keyspan_usa49w_pre_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_pre_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa18x_ids[] = { +static struct usb_device_id keyspan_usa18x_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa19_ids[] = { +static struct usb_device_id keyspan_usa19_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa19w_ids[] = { +static struct usb_device_id keyspan_usa19w_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa19w_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28_ids[] = { +static struct usb_device_id keyspan_usa28_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28x_ids[] = { +static struct usb_device_id keyspan_usa28x_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28x_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa28xa_ids[] = { +static struct usb_device_id keyspan_usa28xa_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa28xa_product_id) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id keyspan_usa49w_ids[] = { +static struct usb_device_id keyspan_usa49w_ids[] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa49w_product_id) }, { } /* Terminating entry */ }; diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c --- a/drivers/usb/serial/keyspan_pda.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/keyspan_pda.c Wed Aug 14 23:17:50 2002 @@ -157,25 +157,25 @@ MODULE_DEVICE_TABLE (usb, id_table_combined); -static __devinitdata struct usb_device_id id_table_std [] = { +static struct usb_device_id id_table_std [] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) }, { } /* Terminating entry */ }; #ifdef KEYSPAN -static __devinitdata struct usb_device_id id_table_fake [] = { +static struct usb_device_id id_table_fake [] = { { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_FAKE_ID) }, { } /* Terminating entry */ }; #endif #ifdef XIRCOM -static __devinitdata struct usb_device_id id_table_fake_xircom [] = { +static struct usb_device_id id_table_fake_xircom [] = { { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, { } }; -static __devinitdata struct usb_device_id id_table_fake_entregra [] = { +static struct usb_device_id id_table_fake_entregra [] = { { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) }, { } }; @@ -693,11 +693,11 @@ 1, 2*HZ); if (rc < 0) { - dbg(__FUNCTION__" - roomquery failed"); + dbg("%s - roomquery failed", __FUNCTION__); goto error; } if (rc == 0) { - dbg(__FUNCTION__" - roomquery returned 0 bytes"); + dbg("%s - roomquery returned 0 bytes", __FUNCTION__); rc = -EIO; goto error; } @@ -716,7 +716,7 @@ port->interrupt_in_urb->dev = serial->dev; rc = usb_submit_urb(port->interrupt_in_urb); if (rc) { - dbg(__FUNCTION__" - usb_submit_urb(read int) failed"); + dbg("%s - usb_submit_urb(read int) failed", __FUNCTION__); goto error; } @@ -780,7 +780,7 @@ record = &xircom_pgs_firmware[0]; #endif if (record == NULL) { - err(__FUNCTION__": unknown vendor, aborting."); + err("%s: unknown vendor, aborting.", __FUNCTION__); return -ENODEV; } @@ -831,7 +831,7 @@ static void keyspan_pda_shutdown (struct usb_serial *serial) { - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); while (serial->port[0].open_count > 0) { keyspan_pda_close (&serial->port[0], NULL); diff -Nru a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c --- a/drivers/usb/serial/kl5kusb105.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/kl5kusb105.c Wed Aug 14 23:17:50 2002 @@ -119,12 +119,12 @@ { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id palmconnect_table [] = { +static struct usb_device_id palmconnect_table [] = { { USB_DEVICE(PALMCONNECT_VID, PALMCONNECT_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id kl5kusb105d_table [] = { +static struct usb_device_id kl5kusb105d_table [] = { { USB_DEVICE(KLSI_VID, KLSI_KL5KUSB105D_PID) }, { } /* Terminating entry */ }; @@ -231,7 +231,8 @@ KLSI_TIMEOUT); if (rc < 0) err("Change port settings failed (error = %d)", rc); - info(__FUNCTION__ " - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d", + info("%s - %d byte block, baudrate %x, databits %d, u1 %d, u2 %d", + __FUNCTION__, settings->pktlen, settings->baudrate, settings->databits, settings->unknown1, settings->unknown2); @@ -262,7 +263,7 @@ __u8 status_buf[KLSI_STATUSBUF_LEN] = { -1,-1}; __u16 status; - info(__FUNCTION__ " - sending SIO Poll request"); + info("%s - sending SIO Poll request", __FUNCTION__); rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), KL5KUSB105A_SIO_POLL, USB_TYPE_VENDOR | USB_DIR_IN, @@ -276,7 +277,7 @@ else { status = status_buf[0] + (status_buf[1]<<8); - info(__FUNCTION__ " - read status %x %x", + info("%s - read status %x %x", __FUNCTION__, status_buf[0], status_buf[1]); *line_state_p = klsi_105_status2linestate(status); @@ -304,7 +305,7 @@ serial->port[i].private = kmalloc(sizeof(struct klsi_105_private), GFP_KERNEL); if (!serial->port[i].private) { - dbg(__FUNCTION__ "kmalloc for klsi_105_private failed."); + dbg("%skmalloc for klsi_105_private failed.", __FUNCTION__); return (-1); /* error */ } priv = (struct klsi_105_private *)serial->port[i].private; @@ -334,8 +335,7 @@ urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (!urb->transfer_buffer) { - err (__FUNCTION__ - " - out of memory for urb buffers."); + err("%s - out of memory for urb buffers.", __FUNCTION__); continue; } } @@ -352,7 +352,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -398,7 +398,7 @@ struct klsi_105_private *priv = (struct klsi_105_private *)port->private; int retval = 0; - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); down (&port->sem); @@ -450,8 +450,7 @@ rc = usb_submit_urb(port->read_urb); if (rc) { - err(__FUNCTION__ - " - failed submitting read urb, error %d", rc); + err("%s - failed submitting read urb, error %d", __FUNCTION__, rc); retval = rc; goto exit; } @@ -468,13 +467,12 @@ err("Enabling read failed (error = %d)", rc); retval = rc; } else - dbg(__FUNCTION__ " - enabled reading"); + dbg("%s - enabled reading", __FUNCTION__); rc = klsi_105_get_line_state(serial, &line_state); if (rc >= 0) { priv->line_state = line_state; - dbg(__FUNCTION__ - " - read line state 0x%lx", line_state); + dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); retval = 0; } else retval = rc; @@ -492,7 +490,7 @@ struct usb_serial *serial; struct klsi_105_private *priv = (struct klsi_105_private *)port->private; - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); serial = get_usb_serial (port, __FUNCTION__); @@ -547,7 +545,7 @@ int result, size; int bytes_sent=0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); /* to lock against someone else trying to take an URB we just selected from the pool */ @@ -562,21 +560,21 @@ for (i=0; iwrite_urb_pool[i]->status != -EINPROGRESS) { urb = priv->write_urb_pool[i]; - dbg(__FUNCTION__ " - using pool URB %d", i); + dbg("%s - using pool URB %d", __FUNCTION__, i); break; } } spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags); if (urb==NULL) { - dbg (__FUNCTION__ " - no more free urbs"); + dbg("%s - no more free urbs", __FUNCTION__); goto exit; } if (urb->transfer_buffer == NULL) { urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (urb->transfer_buffer == NULL) { - err(__FUNCTION__ " - no more kernel memory..."); + err("%s - no more kernel memory...", __FUNCTION__); goto exit; } } @@ -613,8 +611,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(urb); if (result) { - err(__FUNCTION__ - " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); goto exit; } buf += size; @@ -633,15 +630,15 @@ struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct usb_serial *serial = port->serial; - 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", + dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -673,7 +670,7 @@ spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags); - dbg (__FUNCTION__ " - returns %d", chars); + dbg("%s - returns %d", __FUNCTION__, chars); return (chars); } @@ -694,7 +691,7 @@ spin_unlock_irqrestore (&priv->write_urb_pool_lock, flags); - dbg(__FUNCTION__ " - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return (room); } @@ -710,16 +707,16 @@ unsigned char *data = urb->transfer_buffer; int rc; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* The urb might have been killed. */ if (urb->status) { - dbg(__FUNCTION__ " - nonzero read bulk status received: %d", + dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; } if (!serial) { - dbg(__FUNCTION__ " - bad serial pointer, exiting"); + dbg("%s - bad serial pointer, exiting", __FUNCTION__); return; } @@ -728,10 +725,10 @@ */ if (urb->actual_length == 0) { /* empty urbs seem to happen, we ignore them */ - /* dbg(__FUNCTION__ " - emtpy URB"); */ + /* dbg("%s - emtpy URB", __FUNCTION__); */ ; } else if (urb->actual_length <= 2) { - dbg(__FUNCTION__ " - size %d URB not understood", + dbg("%s - size %d URB not understood", __FUNCTION__, urb->actual_length); usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data); } else { @@ -749,9 +746,8 @@ urb->actual_length, data); if (bytes_sent + 2 > urb->actual_length) { - dbg(__FUNCTION__ - " - trying to read more data than available" - " (%d vs. %d)", + dbg("%s - trying to read more data than available" + " (%d vs. %d)", __FUNCTION__, bytes_sent+2, urb->actual_length); /* cap at implied limit */ bytes_sent = urb->actual_length - 2; @@ -780,8 +776,7 @@ port); rc = usb_submit_urb(port->read_urb); if (rc) - err(__FUNCTION__ - " - failed resubmitting read urb, error %d", rc); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, rc); } /* klsi_105_read_bulk_callback */ @@ -801,7 +796,7 @@ if( (cflag & CBAUD) != (old_cflag & CBAUD) ) { /* reassert DTR and (maybe) RTS on transition from B0 */ if( (old_cflag & CBAUD) == B0 ) { - dbg(__FUNCTION__ ": baud was B0"); + dbg("%s: baud was B0", __FUNCTION__); #if 0 priv->control_state |= TIOCM_DTR; /* don't set RTS if using hardware flow control */ @@ -839,7 +834,7 @@ break; } if ((cflag & CBAUD) == B0 ) { - dbg(__FUNCTION__ ": baud is B0"); + dbg("%s: baud is B0", __FUNCTION__); /* Drop RTS and DTR */ /* maybe this should be simulated by sending read * disable and read enable messages? @@ -856,10 +851,10 @@ /* set the number of data bits */ switch (cflag & CSIZE) { case CS5: - dbg(__FUNCTION__ " - 5 bits/byte not supported"); + dbg("%s - 5 bits/byte not supported", __FUNCTION__); return ; case CS6: - dbg(__FUNCTION__ " - 6 bits/byte not supported"); + dbg("%s - 6 bits/byte not supported", __FUNCTION__); return ; case CS7: priv->cfg.databits = kl5kusb105a_dtb_7; @@ -930,7 +925,7 @@ struct mct_u232_private *priv = (struct mct_u232_private *)port->private; unsigned char lcr = priv->last_lcr; - dbg (__FUNCTION__ "state=%d", break_state); + dbg("%sstate=%d", __FUNCTION__, break_state); if (break_state) lcr |= MCT_U232_SET_BREAK; @@ -946,14 +941,14 @@ struct klsi_105_private *priv = (struct klsi_105_private *)port->private; int mask; - dbg (__FUNCTION__ "cmd=0x%x", cmd); + dbg("%scmd=0x%x", __FUNCTION__, cmd); /* Based on code from acm.c and others */ switch (cmd) { case TIOCMGET: { int rc; unsigned long line_state; - dbg (__FUNCTION__ " - TIOCMGET request, just guessing"); + dbg("%s - TIOCMGET request, just guessing", __FUNCTION__); rc = klsi_105_get_line_state(serial, &line_state); if (rc < 0) { @@ -962,7 +957,7 @@ return -ENOIOCTLCMD; } else { priv->line_state = line_state; - dbg(__FUNCTION__ " - read line state 0x%lx", line_state); + dbg("%s - read line state 0x%lx", __FUNCTION__, line_state); } return put_user(priv->line_state, (unsigned long *) arg); }; @@ -977,10 +972,10 @@ /* RTS needs set */ if( ((cmd == TIOCMSET) && (mask & TIOCM_RTS)) || (cmd == TIOCMBIS) ) - dbg (__FUNCTION__ " - set RTS not handled"); + dbg("%s - set RTS not handled", __FUNCTION__); /* priv->control_state |= TIOCM_RTS; */ else - dbg (__FUNCTION__ " - clear RTS not handled"); + dbg("%s - clear RTS not handled", __FUNCTION__); /* priv->control_state &= ~TIOCM_RTS; */ } @@ -988,10 +983,10 @@ /* DTR needs set */ if( ((cmd == TIOCMSET) && (mask & TIOCM_DTR)) || (cmd == TIOCMBIS) ) - dbg (__FUNCTION__ " - set DTR not handled"); + dbg("%s - set DTR not handled", __FUNCTION__); /* priv->control_state |= TIOCM_DTR; */ else - dbg (__FUNCTION__ " - clear DTR not handled"); + dbg("%s - clear DTR not handled", __FUNCTION__); /* priv->control_state &= ~TIOCM_DTR; */ } /* @@ -1002,19 +997,19 @@ case TIOCMIWAIT: /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/ /* TODO */ - dbg (__FUNCTION__ " - TIOCMIWAIT not handled"); + dbg("%s - TIOCMIWAIT not handled", __FUNCTION__); return -ENOIOCTLCMD; case TIOCGICOUNT: /* return count of modemline transitions */ /* TODO */ - dbg (__FUNCTION__ " - TIOCGICOUNT not handled"); + dbg("%s - TIOCGICOUNT not handled", __FUNCTION__); return -ENOIOCTLCMD; case TCGETS: { /* return current info to caller */ int retval; - dbg (__FUNCTION__ " - TCGETS data faked/incomplete"); + dbg("%s - TCGETS data faked/incomplete", __FUNCTION__); retval = verify_area(VERIFY_WRITE, (void *)arg, sizeof(struct termios)); @@ -1030,7 +1025,7 @@ /* set port termios to the one given by the user */ int retval; - dbg (__FUNCTION__ " - TCSETS not handled"); + dbg("%s - TCSETS not handled", __FUNCTION__); retval = verify_area(VERIFY_READ, (void *)arg, sizeof(struct termios)); @@ -1056,7 +1051,7 @@ return -ENOIOCTLCMD; } default: - dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd); + dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd); return(-ENOIOCTLCMD); break; } @@ -1066,7 +1061,7 @@ static void klsi_105_throttle (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -1080,14 +1075,14 @@ { int result; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); up (&port->sem); diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c --- a/drivers/usb/serial/mct_u232.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/mct_u232.c Wed Aug 14 23:17:50 2002 @@ -140,18 +140,18 @@ { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id mct_u232_table [] = { +static struct usb_device_id mct_u232_table [] = { { USB_DEVICE(MCT_U232_VID, MCT_U232_PID) }, { USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id mct_u232_sitecom_table [] = { +static struct usb_device_id mct_u232_sitecom_table [] = { { USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id mct_u232_du_h3sp_table [] = { +static struct usb_device_id mct_u232_du_h3sp_table [] = { { USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) }, { } /* Terminating entry */ }; @@ -388,7 +388,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -407,7 +407,7 @@ struct mct_u232_private *priv = (struct mct_u232_private *)port->private; int retval = 0; - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); down (&port->sem); @@ -477,7 +477,7 @@ static void mct_u232_close (struct usb_serial_port *port, struct file *filp) { - dbg(__FUNCTION__" port %d", port->number); + dbg("%s port %d", __FUNCTION__, port->number); down (&port->sem); @@ -507,10 +507,10 @@ struct usb_serial *serial = port->serial; int result, bytes_sent, size; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (count == 0) { - dbg(__FUNCTION__ " - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); return (0); } @@ -520,7 +520,7 @@ /* another write is still pending? */ if (port->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg("%s - already writing", __FUNCTION__); return (0); } @@ -556,8 +556,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb); if (result) { - err(__FUNCTION__ - " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); up (&port->sem); return result; } @@ -583,15 +582,15 @@ struct usb_serial *serial = port->serial; struct tty_struct *tty = port->tty; - 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", + dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -621,16 +620,16 @@ struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* The urb might have been killed. */ if (urb->status) { - dbg(__FUNCTION__ " - nonzero read bulk status received: %d", + dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; } if (!serial) { - dbg(__FUNCTION__ " - bad serial pointer, exiting"); + dbg("%s - bad serial pointer, exiting", __FUNCTION__); return; } @@ -707,7 +706,7 @@ if( (cflag & CBAUD) != (old_cflag & CBAUD) ) { /* reassert DTR and (maybe) RTS on transition from B0 */ if( (old_cflag & CBAUD) == B0 ) { - dbg(__FUNCTION__ ": baud was B0"); + dbg("%s: baud was B0", __FUNCTION__); priv->control_state |= TIOCM_DTR; /* don't set RTS if using hardware flow control */ if (!(old_cflag & CRTSCTS)) { @@ -743,7 +742,7 @@ mct_u232_set_baud_rate(serial, 9600); break; } if ((cflag & CBAUD) == B0 ) { - dbg(__FUNCTION__ ": baud is B0"); + dbg("%s: baud is B0", __FUNCTION__); /* Drop RTS and DTR */ priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS); mct_u232_set_modem_ctrl(serial, priv->control_state); @@ -814,7 +813,7 @@ struct mct_u232_private *priv = (struct mct_u232_private *)port->private; unsigned char lcr = priv->last_lcr; - dbg (__FUNCTION__ "state=%d", break_state); + dbg("%sstate=%d", __FUNCTION__, break_state); if (break_state) lcr |= MCT_U232_SET_BREAK; @@ -830,7 +829,7 @@ struct mct_u232_private *priv = (struct mct_u232_private *)port->private; int mask; - dbg (__FUNCTION__ "cmd=0x%x", cmd); + dbg("%scmd=0x%x", __FUNCTION__, cmd); /* Based on code from acm.c and others */ switch (cmd) { @@ -875,7 +874,7 @@ return 0; default: - dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd); + dbg("%s: arg not supported - 0x%04x", __FUNCTION__,cmd); return(-ENOIOCTLCMD); break; } diff -Nru a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c --- a/drivers/usb/serial/omninet.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/omninet.c Wed Aug 14 23:17:50 2002 @@ -79,7 +79,7 @@ static int omninet_write_room (struct usb_serial_port *port); static void omninet_shutdown (struct usb_serial *serial); -static __devinitdata struct usb_device_id id_table [] = { +static struct usb_device_id id_table [] = { { USB_DEVICE(ZYXEL_VENDOR_ID, ZYXEL_OMNINET_ID) }, { } /* Terminating entry */ }; @@ -153,7 +153,7 @@ if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); serial = get_usb_serial (port, __FUNCTION__); if (!serial) @@ -169,7 +169,7 @@ od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL ); if( !od ) { - err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data)); + err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct omninet_data)); --port->open_count; port->active = 0; up (&port->sem); @@ -188,7 +188,7 @@ omninet_read_bulk_callback, port); result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); } up (&port->sem); @@ -205,7 +205,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) @@ -252,12 +252,12 @@ // dbg("omninet_read_bulk_callback"); 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; } @@ -285,7 +285,7 @@ omninet_read_bulk_callback, port); result = usb_submit_urb(urb); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; } @@ -303,11 +303,11 @@ // dbg("omninet_write port %d", port->number); if (count == 0) { - dbg(__FUNCTION__" - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); return (0); } if (wport->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__" - already writing"); + dbg("%s - already writing", __FUNCTION__); return (0); } @@ -336,7 +336,7 @@ wport->write_urb->dev = serial->dev; result = usb_submit_urb(wport->write_urb); if (result) - err(__FUNCTION__ " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); else result = count; @@ -379,7 +379,7 @@ } 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; } @@ -394,7 +394,7 @@ static void omninet_shutdown (struct usb_serial *serial) { - dbg (__FUNCTION__); + dbg ("%s", __FUNCTION__); while (serial->port[0].open_count > 0) { omninet_close (&serial->port[0], NULL); diff -Nru a/drivers/usb/serial/usbserial.c b/drivers/usb/serial/usbserial.c --- a/drivers/usb/serial/usbserial.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/usbserial.c Wed Aug 14 23:17:50 2002 @@ -412,7 +412,7 @@ int i, j; int good_spot; - dbg(__FUNCTION__ " %d", num_ports); + dbg("%s %d", __FUNCTION__, num_ports); *minor = 0; for (i = 0; i < SERIAL_TTY_MINORS; ++i) { @@ -427,14 +427,14 @@ continue; if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) { - err(__FUNCTION__ " - Out of memory"); + err("%s - Out of memory", __FUNCTION__); return NULL; } memset(serial, 0, sizeof(struct usb_serial)); serial->magic = USB_SERIAL_MAGIC; serial_table[i] = serial; *minor = i; - dbg(__FUNCTION__ " - minor base = %d", *minor); + dbg("%s - minor base = %d", __FUNCTION__, *minor); for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) serial_table[i] = serial; return serial; @@ -447,7 +447,7 @@ { int i; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (serial == NULL) return; @@ -471,13 +471,13 @@ /* dbg("ezusb_writememory %x, %d", address, length); */ if (!serial->dev) { - dbg(__FUNCTION__ " - no physical device present, failing."); + dbg("%s - no physical device present, failing.", __FUNCTION__); return -ENODEV; } transfer_buffer = kmalloc (length, GFP_KERNEL); if (!transfer_buffer) { - err(__FUNCTION__ " - kmalloc(%d) failed.", length); + err("%s - kmalloc(%d) failed.", __FUNCTION__, length); return -ENOMEM; } memcpy (transfer_buffer, data, length); @@ -490,10 +490,10 @@ int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit) { int response; - dbg(__FUNCTION__ " - %d", reset_bit); + dbg("%s - %d", __FUNCTION__, reset_bit); response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0); if (response < 0) { - err(__FUNCTION__ "- %d failed", reset_bit); + err("%s- %d failed", __FUNCTION__, reset_bit); } return response; } @@ -510,7 +510,7 @@ struct usb_serial_port *port; int portNumber; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); /* initialize the pointer incase something fails */ tty->driver_data = NULL; @@ -546,10 +546,10 @@ return; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return; } @@ -571,10 +571,10 @@ return -ENODEV; } - dbg(__FUNCTION__ " - port %d, %d byte(s)", port->number, count); + dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); if (!port->active) { - dbg (__FUNCTION__ " - port not opened"); + dbg("%s - port not opened", __FUNCTION__); return -EINVAL; } @@ -596,10 +596,10 @@ return -ENODEV; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return -EINVAL; } @@ -622,7 +622,7 @@ } if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return -EINVAL; } @@ -644,10 +644,10 @@ return; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return; } @@ -669,10 +669,10 @@ return; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return; } @@ -694,10 +694,10 @@ return -ENODEV; } - dbg(__FUNCTION__ " - port %d, cmd 0x%.4x", port->number, cmd); + dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return -ENODEV; } @@ -719,10 +719,10 @@ return; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return; } @@ -744,10 +744,10 @@ return; } - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!port->active) { - dbg (__FUNCTION__ " - port not open"); + dbg("%s - port not open", __FUNCTION__); return; } @@ -784,7 +784,7 @@ /* only increment our usage count, if this device is _really_ a generic device */ if_generic_do(MOD_INC_USE_COUNT); - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -810,7 +810,7 @@ port); result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); } } @@ -824,7 +824,7 @@ { struct usb_serial *serial = port->serial; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -855,17 +855,17 @@ struct usb_serial *serial = port->serial; int result; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (count == 0) { - dbg(__FUNCTION__ " - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); return (0); } /* only do something if we have a bulk out endpoint */ if (serial->num_bulk_out) { if (port->write_urb->status == -EINPROGRESS) { - dbg (__FUNCTION__ " - already writing"); + dbg("%s - already writing", __FUNCTION__); return (0); } @@ -893,7 +893,7 @@ /* send the data out the bulk port */ result = usb_submit_urb(port->write_urb); if (result) - err(__FUNCTION__ " - failed submitting write urb, error %d", result); + err("%s - failed submitting write urb, error %d", __FUNCTION__, result); else result = count; @@ -910,14 +910,14 @@ struct usb_serial *serial = port->serial; int room = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (serial->num_bulk_out) { if (port->write_urb->status != -EINPROGRESS) room = port->bulk_out_size; } - dbg(__FUNCTION__ " - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return (room); } @@ -927,14 +927,14 @@ struct usb_serial *serial = port->serial; int chars = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (serial->num_bulk_out) { if (port->write_urb->status == -EINPROGRESS) chars = port->write_urb->transfer_buffer_length; } - dbg (__FUNCTION__ " - returns %d", chars); + dbg("%s - returns %d", __FUNCTION__, chars); return (chars); } @@ -948,15 +948,15 @@ 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) { - dbg(__FUNCTION__ " - nonzero read bulk status received: %d", urb->status); + dbg("%s - nonzero read bulk status received: %d", __FUNCTION__, urb->status); return; } @@ -985,7 +985,7 @@ port); result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); } @@ -994,15 +994,15 @@ struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 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; } @@ -1017,7 +1017,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -1034,7 +1034,7 @@ struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); struct tty_struct *tty; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); if (!serial) { return; @@ -1042,7 +1042,7 @@ tty = port->tty; if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) { - dbg(__FUNCTION__ " - write wakeup call."); + dbg("%s - write wakeup call.", __FUNCTION__); (tty->ldisc.write_wakeup)(tty); } @@ -1270,7 +1270,7 @@ max_endpoints = max(num_bulk_in, num_bulk_out); max_endpoints = max(max_endpoints, num_interrupt_in); max_endpoints = max(max_endpoints, (int)serial->num_ports); - dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints); + dbg("%s - setting up %d port structures for this device", __FUNCTION__, max_endpoints); for (i = 0; i < max_endpoints; ++i) { port = &serial->port[i]; port->number = i + serial->minor; @@ -1400,7 +1400,11 @@ static struct tty_driver serial_tty_driver = { magic: TTY_DRIVER_MAGIC, driver_name: "usb-serial", +#ifndef CONFIG_DEVFS_FS + name: "ttyUSB", +#else name: "usb/tts/%d", +#endif major: SERIAL_TTY_MAJOR, minor_start: 0, num: SERIAL_TTY_MINORS, @@ -1440,7 +1444,7 @@ serial_tty_driver.init_termios = tty_std_termios; serial_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; if (tty_register_driver (&serial_tty_driver)) { - err(__FUNCTION__ " - failed to register tty driver"); + err("%s - failed to register tty driver", __FUNCTION__); return -1; } diff -Nru a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c --- a/drivers/usb/serial/visor.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/visor.c Wed Aug 14 23:17:50 2002 @@ -170,12 +170,12 @@ static int clie_3_5_startup (struct usb_serial *serial); -static __devinitdata struct usb_device_id visor_id_table [] = { +static struct usb_device_id visor_id_table [] = { { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id palm_4_0_id_table [] = { +static struct usb_device_id palm_4_0_id_table [] = { { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) }, { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) }, { USB_DEVICE(PALM_VENDOR_ID, PALM_M515_ID) }, @@ -185,19 +185,19 @@ { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id clie_id_3_5_table [] = { +static struct usb_device_id clie_id_3_5_table [] = { { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_3_5_ID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id clie_id_4_0_table [] = { +static struct usb_device_id clie_id_4_0_table [] = { { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_0_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_S360_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_CLIE_4_1_ID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id id_table [] = { +static __devinitdata struct usb_device_id id_table_combined [] = { { USB_DEVICE(HANDSPRING_VENDOR_ID, HANDSPRING_VISOR_ID) }, { USB_DEVICE(PALM_VENDOR_ID, PALM_M500_ID) }, { USB_DEVICE(PALM_VENDOR_ID, PALM_M505_ID) }, @@ -212,7 +212,7 @@ { } /* Terminating entry */ }; -MODULE_DEVICE_TABLE (usb, id_table); +MODULE_DEVICE_TABLE (usb, id_table_combined); @@ -339,7 +339,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) { err ("Device lied about number of ports, please use a lower one."); @@ -368,7 +368,7 @@ visor_read_bulk_callback, port); result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); } up (&port->sem); @@ -385,7 +385,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) @@ -401,7 +401,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, @@ -437,7 +437,7 @@ int bytes_sent = 0; int transfer_size; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); while (count > 0) { /* try to find a free urb in our list of them */ @@ -451,13 +451,13 @@ } spin_unlock_irqrestore (&write_urb_pool_lock, flags); if (urb == NULL) { - dbg (__FUNCTION__ " - no more free urbs"); + dbg("%s - no more free urbs", __FUNCTION__); goto exit; } if (urb->transfer_buffer == NULL) { urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (urb->transfer_buffer == NULL) { - err(__FUNCTION__" no more kernel memory..."); + err("%s no more kernel memory...", __FUNCTION__); goto exit; } } @@ -482,7 +482,7 @@ /* send it down the pipe */ status = usb_submit_urb(urb); if (status) { - err(__FUNCTION__ " - usb_submit_urb(write bulk) failed with status = %d", status); + err("%s - usb_submit_urb(write bulk) failed with status = %d", __FUNCTION__, status); bytes_sent = status; break; } @@ -504,7 +504,7 @@ int i; int room = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); spin_lock_irqsave (&write_urb_pool_lock, flags); @@ -516,7 +516,7 @@ spin_unlock_irqrestore (&write_urb_pool_lock, flags); - dbg(__FUNCTION__ " - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return (room); } @@ -527,7 +527,7 @@ int i; int chars = 0; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); spin_lock_irqsave (&write_urb_pool_lock, flags); @@ -539,7 +539,7 @@ spin_unlock_irqrestore (&write_urb_pool_lock, flags); - dbg (__FUNCTION__ " - returns %d", chars); + dbg("%s - returns %d", __FUNCTION__, chars); return (chars); } @@ -551,10 +551,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; } @@ -577,15 +577,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; } @@ -612,7 +612,7 @@ visor_read_bulk_callback, port); result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; } @@ -620,7 +620,7 @@ static void visor_throttle (struct usb_serial_port *port) { - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -636,14 +636,14 @@ { int result; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); port->read_urb->dev = port->serial->dev; result = usb_submit_urb(port->read_urb); if (result) - err(__FUNCTION__ " - failed submitting read urb, error %d", result); + err("%s - failed submitting read urb, error %d", __FUNCTION__, result); up (&port->sem); @@ -658,20 +658,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; @@ -712,7 +712,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); } @@ -721,7 +721,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); } @@ -731,7 +731,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); @@ -745,7 +745,7 @@ int result; u8 data; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); /* * Note that PEG-300 series devices expect the following two calls. @@ -756,11 +756,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; } @@ -770,11 +770,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; } @@ -785,7 +785,7 @@ { int i; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) { @@ -797,7 +797,7 @@ 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; } @@ -808,10 +808,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; } @@ -820,50 +820,50 @@ 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"); + dbg("%s - RTS/CTS is disabled", __FUNCTION__); /* determine software flow control */ if (I_IXOFF(port->tty)) - dbg(__FUNCTION__ " - XON/XOFF is enabled, XON = %2x, XOFF = %2x", START_CHAR(port->tty), STOP_CHAR(port->tty)); + dbg("%s - XON/XOFF is enabled, XON = %2x, XOFF = %2x", __FUNCTION__, START_CHAR(port->tty), STOP_CHAR(port->tty)); else - dbg(__FUNCTION__ " - XON/XOFF is disabled"); + dbg("%s - XON/XOFF is disabled", __FUNCTION__); /* get the baud rate wanted */ - dbg(__FUNCTION__ " - baud rate = %d", tty_get_baud_rate(port->tty)); + dbg("%s - baud rate = %d", __FUNCTION__, tty_get_baud_rate(port->tty)); return; } @@ -892,7 +892,7 @@ urb->transfer_buffer = NULL; urb->transfer_buffer = kmalloc (URB_TRANSFER_BUFFER_SIZE, GFP_KERNEL); if (!urb->transfer_buffer) { - err (__FUNCTION__ " - out of memory for urb buffers."); + err("%s - out of memory for urb buffers.", __FUNCTION__); continue; } } diff -Nru a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c --- a/drivers/usb/serial/whiteheat.c Wed Aug 14 23:17:50 2002 +++ b/drivers/usb/serial/whiteheat.c Wed Aug 14 23:17:50 2002 @@ -103,12 +103,12 @@ separate ID tables, and then a third table that combines them just for the purpose of exporting the autoloading information. */ -static __devinitdata struct usb_device_id id_table_std [] = { +static struct usb_device_id id_table_std [] = { { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_WHITE_HEAT_ID) }, { } /* Terminating entry */ }; -static __devinitdata struct usb_device_id id_table_prerenumeration [] = { +static struct usb_device_id id_table_prerenumeration [] = { { USB_DEVICE(CONNECT_TECH_VENDOR_ID, CONNECT_TECH_FAKE_WHITE_HEAT_ID) }, { } /* Terminating entry */ }; @@ -186,7 +186,7 @@ *****************************************************************************/ static void command_port_write_callback (struct urb *urb) { - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); if (urb->status) { dbg ("nonzero urb status: %d", urb->status); @@ -207,15 +207,15 @@ unsigned char *data = urb->transfer_buffer; int result; - dbg (__FUNCTION__); + dbg("%s", __FUNCTION__); if (urb->status) { - dbg (__FUNCTION__ " - nonzero urb status: %d", urb->status); + dbg("%s - nonzero urb status: %d", __FUNCTION__, urb->status); return; } if (!serial) { - dbg(__FUNCTION__ " - bad serial pointer, exiting"); + dbg("%s - bad serial pointer, exiting", __FUNCTION__); return; } @@ -223,7 +223,7 @@ info = (struct whiteheat_private *)port->private; if (!info) { - dbg (__FUNCTION__ " - info is NULL, exiting."); + dbg("%s - info is NULL, exiting.", __FUNCTION__); return; } @@ -246,7 +246,7 @@ command_port_read_callback, port); result = usb_submit_urb(port->read_urb); if (result) - dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result); + dbg("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); } @@ -258,7 +258,7 @@ __u8 *transfer_buffer; int retval = 0; - dbg(__FUNCTION__" - command %d", command); + dbg("%s - command %d", __FUNCTION__, command); port = &serial->port[COMMAND_PORT]; info = (struct whiteheat_private *)port->private; @@ -271,7 +271,7 @@ port->write_urb->dev = serial->dev; retval = usb_submit_urb (port->write_urb); if (retval) { - dbg (__FUNCTION__" - submit urb failed"); + dbg("%s - submit urb failed", __FUNCTION__); goto exit; } @@ -282,19 +282,19 @@ } if (info->command_finished == FALSE) { - dbg (__FUNCTION__ " - command timed out."); + dbg("%s - command timed out.", __FUNCTION__); retval = -ETIMEDOUT; goto exit; } if (info->command_finished == WHITEHEAT_CMD_FAILURE) { - dbg (__FUNCTION__ " - command failed."); + dbg("%s - command failed.", __FUNCTION__); retval = -EIO; goto exit; } if (info->command_finished == WHITEHEAT_CMD_COMPLETE) - dbg (__FUNCTION__ " - command completed."); + dbg("%s - command completed.", __FUNCTION__); exit: return retval; @@ -308,7 +308,7 @@ struct whiteheat_private *info; int retval = 0; - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); @@ -323,7 +323,7 @@ if (command_port->private == NULL) { info = (struct whiteheat_private *)kmalloc (sizeof(struct whiteheat_private), GFP_KERNEL); if (info == NULL) { - err(__FUNCTION__ " - out of memory"); + err("%s - out of memory", __FUNCTION__); retval = -ENOMEM; goto error_exit; } @@ -336,7 +336,7 @@ command_port->tty = port->tty; /* need this to "fake" our our sanity check macros */ retval = usb_submit_urb (command_port->read_urb); if (retval) { - err(__FUNCTION__ " - failed submitting read urb, error %d", retval); + err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); goto error_exit; } } @@ -345,7 +345,7 @@ port->read_urb->dev = port->serial->dev; retval = usb_submit_urb(port->read_urb); if (retval) { - err(__FUNCTION__ " - failed submitting read urb, error %d", retval); + err("%s - failed submitting read urb, error %d", __FUNCTION__, retval); goto error_exit; } @@ -360,7 +360,7 @@ /* FIXME!!! */ } - dbg(__FUNCTION__ " - exit"); + dbg("%s - exit", __FUNCTION__); up (&port->sem); return retval; @@ -369,7 +369,7 @@ --port->open_count; MOD_DEC_USE_COUNT; - dbg(__FUNCTION__ " - error_exit"); + dbg("%s - error_exit", __FUNCTION__); up (&port->sem); return retval; @@ -380,7 +380,7 @@ { struct whiteheat_min_set close_command; - dbg(__FUNCTION__ " - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); down (&port->sem); --port->open_count; @@ -406,7 +406,7 @@ static int whiteheat_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; } @@ -417,12 +417,12 @@ unsigned int cflag; struct whiteheat_port_settings port_settings; - dbg(__FUNCTION__ " -port %d", port->number); + dbg("%s -port %d", __FUNCTION__, port->number); down (&port->sem); if ((!port->tty) || (!port->tty->termios)) { - dbg(__FUNCTION__" - no tty structures"); + dbg("%s - no tty structures", __FUNCTION__); goto exit; } @@ -431,7 +431,7 @@ 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__); goto exit; } } @@ -448,7 +448,7 @@ default: case CS8: port_settings.bits = 8; break; } - dbg(__FUNCTION__ " - data bits = %d", port_settings.bits); + dbg("%s - data bits = %d", __FUNCTION__, port_settings.bits); /* determine the parity */ if (cflag & PARENB) @@ -458,14 +458,14 @@ port_settings.parity = 'e'; else port_settings.parity = 'n'; - dbg(__FUNCTION__ " - parity = %c", port_settings.parity); + dbg("%s - parity = %c", __FUNCTION__, port_settings.parity); /* figure out the stop bits requested */ if (cflag & CSTOPB) port_settings.stop = 2; else port_settings.stop = 1; - dbg(__FUNCTION__ " - stop bits = %d", port_settings.stop); + dbg("%s - stop bits = %d", __FUNCTION__, port_settings.stop); /* figure out the flow control settings */ @@ -473,7 +473,7 @@ port_settings.hflow = (WHITEHEAT_CTS_FLOW | WHITEHEAT_RTS_FLOW); else port_settings.hflow = 0; - dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s", + dbg("%s - hardware flow control = %s %s %s %s", __FUNCTION__, (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "", (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "", (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "", @@ -484,15 +484,15 @@ port_settings.sflow = 'b'; else port_settings.sflow = 'n'; - dbg(__FUNCTION__ " - software flow control = %c", port_settings.sflow); + dbg("%s - software flow control = %c", __FUNCTION__, port_settings.sflow); port_settings.xon = START_CHAR(port->tty); port_settings.xoff = STOP_CHAR(port->tty); - dbg(__FUNCTION__ " - XON = %2x, XOFF = %2x", port_settings.xon, port_settings.xoff); + dbg("%s - XON = %2x, XOFF = %2x", __FUNCTION__, port_settings.xon, port_settings.xoff); /* get the baud rate wanted */ port_settings.baud = tty_get_baud_rate(port->tty); - dbg(__FUNCTION__ " - baud rate = %d", port_settings.baud); + dbg("%s - baud rate = %d", __FUNCTION__, port_settings.baud); /* handle any settings that aren't specified in the tty structure */ port_settings.lloop = 0; @@ -508,7 +508,7 @@ static void whiteheat_throttle (struct usb_serial_port *port) { - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* Change the control signals */ /* FIXME!!! */ @@ -519,7 +519,7 @@ static void whiteheat_unthrottle (struct usb_serial_port *port) { - dbg(__FUNCTION__" - port %d", port->number); + dbg("%s - port %d", __FUNCTION__, port->number); /* Change the control signals */ /* FIXME!!! */ @@ -546,7 +546,7 @@ int response; const struct whiteheat_hex_record *record; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); response = ezusb_set_reset (serial, 1); @@ -555,7 +555,7 @@ response = ezusb_writememory (serial, record->address, (unsigned char *)record->data, record->data_size, 0xa0); if (response < 0) { - err(__FUNCTION__ " - ezusb_writememory failed for loader (%d %04X %p %d)", + err("%s - ezusb_writememory failed for loader (%d %04X %p %d)", __FUNCTION__, response, record->address, record->data, record->data_size); break; } @@ -572,7 +572,7 @@ response = ezusb_writememory (serial, record->address, (unsigned char *)record->data, record->data_size, 0xa3); if (response < 0) { - err(__FUNCTION__ " - ezusb_writememory failed for first firmware step (%d %04X %p %d)", + err("%s - ezusb_writememory failed for first firmware step (%d %04X %p %d)", __FUNCTION__, response, record->address, record->data, record->data_size); break; } @@ -586,7 +586,7 @@ response = ezusb_writememory (serial, record->address, (unsigned char *)record->data, record->data_size, 0xa0); if (response < 0) { - err(__FUNCTION__" - ezusb_writememory failed for second firmware step (%d %04X %p %d)", + err("%s - ezusb_writememory failed for second firmware step (%d %04X %p %d)", __FUNCTION__, response, record->address, record->data, record->data_size); break; } @@ -664,7 +664,7 @@ struct usb_serial_port *command_port; int i; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); /* stop reads and writes on all ports */ for (i=0; i < serial->num_ports; ++i) {