# 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.553 -> 1.554 # drivers/usb/class/bluetty.c 1.26 -> 1.27 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/08/28 greg@kroah.com 1.554 # USB: bluetty driver: fixed __FUNCTION__ usages. # -------------------------------------------- # diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c --- a/drivers/usb/class/bluetty.c Wed Aug 28 23:20:01 2002 +++ b/drivers/usb/class/bluetty.c Wed Aug 28 23:20:01 2002 @@ -289,7 +289,7 @@ int i; int status; - dbg (__FUNCTION__); + dbg ("%s", __FUNCTION__); /* try to find a free urb in our list */ for (i = 0; i < NUM_CONTROL_URBS; ++i) { @@ -300,7 +300,7 @@ } } if (urb == NULL) { - dbg (__FUNCTION__ " - no free urbs"); + dbg ("%s - no free urbs", __FUNCTION__); return -ENOMEM; } @@ -308,7 +308,7 @@ if (urb->transfer_buffer == NULL) { urb->transfer_buffer = kmalloc (len, GFP_KERNEL); if (urb->transfer_buffer == NULL) { - err (__FUNCTION__" - out of memory"); + err ("%s - out of memory", __FUNCTION__); return -ENOMEM; } } @@ -316,7 +316,7 @@ kfree (urb->transfer_buffer); urb->transfer_buffer = kmalloc (len, GFP_KERNEL); if (urb->transfer_buffer == NULL) { - err (__FUNCTION__" - out of memory"); + err ("%s - out of memory", __FUNCTION__); return -ENOMEM; } } @@ -334,7 +334,7 @@ /* send it down the pipe */ status = usb_submit_urb(urb, GFP_KERNEL); if (status) - dbg(__FUNCTION__ " - usb_submit_urb(control) failed with status = %d", status); + dbg("%s - usb_submit_urb(control) failed with status = %d", __FUNCTION__, status); return status; } @@ -351,7 +351,7 @@ struct usb_bluetooth *bluetooth; int result; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); /* initialize the pointer incase something fails */ tty->driver_data = NULL; @@ -389,7 +389,7 @@ bluetooth_read_bulk_callback, bluetooth); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); if (result) - dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed with status %d", result); + dbg("%s - usb_submit_urb(read bulk) failed with status %d", __FUNCTION__, result); #endif FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev, usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress), @@ -399,7 +399,7 @@ bluetooth->interrupt_in_interval); result = usb_submit_urb(bluetooth->interrupt_in_urb, GFP_KERNEL); if (result) - dbg(__FUNCTION__ " - usb_submit_urb(interrupt in) failed with status %d", result); + dbg("%s - usb_submit_urb(interrupt in) failed with status %d", __FUNCTION__, result); } up(&bluetooth->lock); @@ -417,10 +417,10 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not opened"); + dbg ("%s - device not opened", __FUNCTION__); return; } @@ -456,24 +456,24 @@ return -ENODEV; } - dbg(__FUNCTION__ " - %d byte(s)", count); + dbg("%s - %d byte(s)", __FUNCTION__, count); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not opened"); + dbg ("%s - device not opened", __FUNCTION__); return -EINVAL; } if (count == 0) { - dbg(__FUNCTION__ " - write request of 0 bytes"); + dbg("%s - write request of 0 bytes", __FUNCTION__); return 0; } if (count == 1) { - dbg(__FUNCTION__ " - write request only included type %d", buf[0]); + dbg("%s - write request only included type %d", __FUNCTION__, buf[0]); return 1; } #ifdef DEBUG - printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ " - length = %d, data = ", count); + printk (KERN_DEBUG __FILE__ ": %s - length = %d, data = ", __FUNCTION__, count); for (i = 0; i < count; ++i) { printk ("%.2x ", buf[i]); } @@ -483,7 +483,7 @@ if (from_user) { temp_buffer = kmalloc (count, GFP_KERNEL); if (temp_buffer == NULL) { - err (__FUNCTION__ "- out of memory."); + err ("%s - out of memory.", __FUNCTION__); retval = -ENOMEM; goto exit; } @@ -499,7 +499,7 @@ switch (*current_buffer) { /* First byte indicates the type of packet */ case CMD_PKT: - /* dbg(__FUNCTION__ "- Send cmd_pkt len:%d", count);*/ + /* dbg("%s- Send cmd_pkt len:%d", __FUNCTION__, count);*/ retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, ¤t_buffer[1], count-1); if (retval) { @@ -525,7 +525,7 @@ } } if (urb == NULL) { - dbg (__FUNCTION__ " - no free urbs"); + dbg ("%s - no free urbs", __FUNCTION__); retval = bytes_sent; goto exit; } @@ -541,7 +541,7 @@ /* send it down the pipe */ retval = usb_submit_urb(urb, GFP_KERNEL); if (retval) { - dbg(__FUNCTION__ " - usb_submit_urb(write bulk) failed with error = %d", retval); + dbg("%s - usb_submit_urb(write bulk) failed with error = %d", __FUNCTION__, retval); goto exit; } #ifdef BTBUGGYHARDWARE @@ -560,7 +560,7 @@ break; default : - dbg(__FUNCTION__" - unsupported (at this time) write type"); + dbg("%s - unsupported (at this time) write type", __FUNCTION__); retval = -EINVAL; break; } @@ -583,10 +583,10 @@ return -ENODEV; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return -EINVAL; } @@ -596,7 +596,7 @@ } } - dbg(__FUNCTION__ " - returns %d", room); + dbg("%s - returns %d", __FUNCTION__, room); return room; } @@ -612,7 +612,7 @@ } if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return -EINVAL; } @@ -622,7 +622,7 @@ } } - dbg (__FUNCTION__ " - returns %d", chars); + dbg ("%s - returns %d", __FUNCTION__, chars); return chars; } @@ -635,14 +635,14 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return; } - dbg(__FUNCTION__ " unsupported (at this time)"); + dbg("%s unsupported (at this time)", __FUNCTION__); return; } @@ -656,14 +656,14 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return; } - dbg(__FUNCTION__ " unsupported (at this time)"); + dbg("%s unsupported (at this time)", __FUNCTION__); } @@ -675,10 +675,10 @@ return -ENODEV; } - dbg(__FUNCTION__ " - cmd 0x%.4x", cmd); + dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return -ENODEV; } @@ -695,10 +695,10 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return; } @@ -717,10 +717,10 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return; } @@ -731,7 +731,7 @@ bluetooth_read_bulk_callback, bluetooth); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); if (result) - err (__FUNCTION__ " - failed submitting read urb, error %d", result); + err ("%s - failed submitting read urb, error %d", __FUNCTION__, result); } } @@ -742,10 +742,10 @@ return; } - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth->open_count) { - dbg (__FUNCTION__ " - device not open"); + dbg ("%s - device not open", __FUNCTION__); return; } @@ -768,27 +768,27 @@ unsigned int count = urb->actual_length; unsigned int packet_size; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth) { - dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); + dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__); return; } if (urb->status) { - dbg(__FUNCTION__ " - nonzero int status received: %d", urb->status); + dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status); return; } if (!count) { - dbg(__FUNCTION__ " - zero length int"); + dbg("%s - zero length int", __FUNCTION__); return; } #ifdef DEBUG if (count) { - printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count); + printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count); for (i = 0; i < count; ++i) { printk ("%.2x ", data[i]); } @@ -818,7 +818,7 @@ } if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) { - err(__FUNCTION__ " - exceeded EVENT_BUFFER_SIZE"); + err("%s - exceeded EVENT_BUFFER_SIZE", __FUNCTION__); bluetooth->int_packet_pos = 0; return; } @@ -834,7 +834,7 @@ return; if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) { - err(__FUNCTION__ " - packet was too long"); + err("%s - packet was too long", __FUNCTION__); bluetooth->int_packet_pos = 0; return; } @@ -858,15 +858,15 @@ { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth) { - dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); + dbg("%s - bad bluetooth 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; } } @@ -882,30 +882,30 @@ int result; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth) { - dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); + dbg("%s - bad bluetooth 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); if (urb->status == -ENOENT) { - dbg(__FUNCTION__ " - URB canceled, won't reschedule"); + dbg("%s - URB canceled, won't reschedule", __FUNCTION__); return; } goto exit; } if (!count) { - dbg(__FUNCTION__ " - zero length read bulk"); + dbg("%s - zero length read bulk", __FUNCTION__); goto exit; } #ifdef DEBUG if (count) { - printk (KERN_DEBUG __FILE__ ": " __FUNCTION__ "- length = %d, data = ", count); + printk (KERN_DEBUG __FILE__ ": %s- length = %d, data = ", __FUNCTION__, count); for (i = 0; i < count; ++i) { printk ("%.2x ", data[i]); } @@ -922,7 +922,7 @@ bluetooth_read_bulk_callback, bluetooth); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); if (result) - err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; } @@ -939,7 +939,7 @@ } if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) { - err(__FUNCTION__ " - exceeded ACL_BUFFER_SIZE"); + err("%s - exceeded ACL_BUFFER_SIZE", __FUNCTION__); bluetooth->bulk_packet_pos = 0; goto exit; } @@ -956,7 +956,7 @@ } if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) { - err(__FUNCTION__ " - packet was too long"); + err("%s - packet was too long", __FUNCTION__); bluetooth->bulk_packet_pos = 0; goto exit; } @@ -983,7 +983,7 @@ bluetooth_read_bulk_callback, bluetooth); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); if (result) - err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); + err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result); return; } @@ -993,15 +993,15 @@ { struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth) { - dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); + dbg("%s - bad bluetooth 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 @@ struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__); struct tty_struct *tty; - dbg(__FUNCTION__); + dbg("%s", __FUNCTION__); if (!bluetooth) { return; @@ -1025,7 +1025,7 @@ tty = bluetooth->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); } @@ -1087,7 +1087,7 @@ if ((num_bulk_in != 1) || (num_bulk_out != 1) || (num_interrupt_in != 1)) { - dbg (__FUNCTION__ " - improper number of endpoints. Bluetooth driver not bound."); + dbg ("%s - improper number of endpoints. Bluetooth driver not bound.", __FUNCTION__); return NULL; } @@ -1327,7 +1327,7 @@ bluetooth_tty_driver.init_termios = tty_std_termios; bluetooth_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; if (tty_register_driver (&bluetooth_tty_driver)) { - err(__FUNCTION__ " - failed to register tty driver"); + err("%s - failed to register tty driver", __FUNCTION__); return -1; }