Commit 455f878a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: bluetty driver: fixed __FUNCTION__ usages.

parent c009ab50
...@@ -289,7 +289,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -289,7 +289,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
int i; int i;
int status; int status;
dbg (__FUNCTION__); dbg ("%s", __FUNCTION__);
/* try to find a free urb in our list */ /* try to find a free urb in our list */
for (i = 0; i < NUM_CONTROL_URBS; ++i) { for (i = 0; i < NUM_CONTROL_URBS; ++i) {
...@@ -300,7 +300,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -300,7 +300,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
} }
} }
if (urb == NULL) { if (urb == NULL) {
dbg (__FUNCTION__ " - no free urbs"); dbg ("%s - no free urbs", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -308,7 +308,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -308,7 +308,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
if (urb->transfer_buffer == NULL) { if (urb->transfer_buffer == NULL) {
urb->transfer_buffer = kmalloc (len, GFP_KERNEL); urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
if (urb->transfer_buffer == NULL) { if (urb->transfer_buffer == NULL) {
err (__FUNCTION__" - out of memory"); err ("%s - out of memory", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
} }
...@@ -316,7 +316,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -316,7 +316,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
kfree (urb->transfer_buffer); kfree (urb->transfer_buffer);
urb->transfer_buffer = kmalloc (len, GFP_KERNEL); urb->transfer_buffer = kmalloc (len, GFP_KERNEL);
if (urb->transfer_buffer == NULL) { if (urb->transfer_buffer == NULL) {
err (__FUNCTION__" - out of memory"); err ("%s - out of memory", __FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
} }
...@@ -334,7 +334,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int ...@@ -334,7 +334,7 @@ static int bluetooth_ctrl_msg (struct usb_bluetooth *bluetooth, int request, int
/* send it down the pipe */ /* send it down the pipe */
status = usb_submit_urb(urb, GFP_KERNEL); status = usb_submit_urb(urb, GFP_KERNEL);
if (status) 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; return status;
} }
...@@ -351,7 +351,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp) ...@@ -351,7 +351,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp)
struct usb_bluetooth *bluetooth; struct usb_bluetooth *bluetooth;
int result; int result;
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
/* initialize the pointer incase something fails */ /* initialize the pointer incase something fails */
tty->driver_data = NULL; tty->driver_data = NULL;
...@@ -389,7 +389,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp) ...@@ -389,7 +389,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp)
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) 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 #endif
FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev, FILL_INT_URB (bluetooth->interrupt_in_urb, bluetooth->dev,
usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress), usb_rcvintpipe(bluetooth->dev, bluetooth->interrupt_in_endpointAddress),
...@@ -399,7 +399,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp) ...@@ -399,7 +399,7 @@ static int bluetooth_open (struct tty_struct *tty, struct file * filp)
bluetooth->interrupt_in_interval); bluetooth->interrupt_in_interval);
result = usb_submit_urb(bluetooth->interrupt_in_urb, GFP_KERNEL); result = usb_submit_urb(bluetooth->interrupt_in_urb, GFP_KERNEL);
if (result) 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); up(&bluetooth->lock);
...@@ -417,10 +417,10 @@ static void bluetooth_close (struct tty_struct *tty, struct file * filp) ...@@ -417,10 +417,10 @@ static void bluetooth_close (struct tty_struct *tty, struct file * filp)
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not opened"); dbg ("%s - device not opened", __FUNCTION__);
return; return;
} }
...@@ -456,24 +456,24 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -456,24 +456,24 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
return -ENODEV; return -ENODEV;
} }
dbg(__FUNCTION__ " - %d byte(s)", count); dbg("%s - %d byte(s)", __FUNCTION__, count);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not opened"); dbg ("%s - device not opened", __FUNCTION__);
return -EINVAL; return -EINVAL;
} }
if (count == 0) { if (count == 0) {
dbg(__FUNCTION__ " - write request of 0 bytes"); dbg("%s - write request of 0 bytes", __FUNCTION__);
return 0; return 0;
} }
if (count == 1) { 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; return 1;
} }
#ifdef DEBUG #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) { for (i = 0; i < count; ++i) {
printk ("%.2x ", buf[i]); printk ("%.2x ", buf[i]);
} }
...@@ -483,7 +483,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -483,7 +483,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
if (from_user) { if (from_user) {
temp_buffer = kmalloc (count, GFP_KERNEL); temp_buffer = kmalloc (count, GFP_KERNEL);
if (temp_buffer == NULL) { if (temp_buffer == NULL) {
err (__FUNCTION__ "- out of memory."); err ("%s - out of memory.", __FUNCTION__);
retval = -ENOMEM; retval = -ENOMEM;
goto exit; goto exit;
} }
...@@ -499,7 +499,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -499,7 +499,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
switch (*current_buffer) { switch (*current_buffer) {
/* First byte indicates the type of packet */ /* First byte indicates the type of packet */
case CMD_PKT: 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, &current_buffer[1], count-1); retval = bluetooth_ctrl_msg (bluetooth, 0x00, 0x00, &current_buffer[1], count-1);
if (retval) { if (retval) {
...@@ -525,7 +525,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -525,7 +525,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
} }
} }
if (urb == NULL) { if (urb == NULL) {
dbg (__FUNCTION__ " - no free urbs"); dbg ("%s - no free urbs", __FUNCTION__);
retval = bytes_sent; retval = bytes_sent;
goto exit; goto exit;
} }
...@@ -541,7 +541,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -541,7 +541,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
/* send it down the pipe */ /* send it down the pipe */
retval = usb_submit_urb(urb, GFP_KERNEL); retval = usb_submit_urb(urb, GFP_KERNEL);
if (retval) { 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; goto exit;
} }
#ifdef BTBUGGYHARDWARE #ifdef BTBUGGYHARDWARE
...@@ -560,7 +560,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign ...@@ -560,7 +560,7 @@ static int bluetooth_write (struct tty_struct * tty, int from_user, const unsign
break; break;
default : default :
dbg(__FUNCTION__" - unsupported (at this time) write type"); dbg("%s - unsupported (at this time) write type", __FUNCTION__);
retval = -EINVAL; retval = -EINVAL;
break; break;
} }
...@@ -583,10 +583,10 @@ static int bluetooth_write_room (struct tty_struct *tty) ...@@ -583,10 +583,10 @@ static int bluetooth_write_room (struct tty_struct *tty)
return -ENODEV; return -ENODEV;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return -EINVAL; return -EINVAL;
} }
...@@ -596,7 +596,7 @@ static int bluetooth_write_room (struct tty_struct *tty) ...@@ -596,7 +596,7 @@ static int bluetooth_write_room (struct tty_struct *tty)
} }
} }
dbg(__FUNCTION__ " - returns %d", room); dbg("%s - returns %d", __FUNCTION__, room);
return room; return room;
} }
...@@ -612,7 +612,7 @@ static int bluetooth_chars_in_buffer (struct tty_struct *tty) ...@@ -612,7 +612,7 @@ static int bluetooth_chars_in_buffer (struct tty_struct *tty)
} }
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return -EINVAL; return -EINVAL;
} }
...@@ -622,7 +622,7 @@ static int bluetooth_chars_in_buffer (struct tty_struct *tty) ...@@ -622,7 +622,7 @@ static int bluetooth_chars_in_buffer (struct tty_struct *tty)
} }
} }
dbg (__FUNCTION__ " - returns %d", chars); dbg ("%s - returns %d", __FUNCTION__, chars);
return chars; return chars;
} }
...@@ -635,14 +635,14 @@ static void bluetooth_throttle (struct tty_struct * tty) ...@@ -635,14 +635,14 @@ static void bluetooth_throttle (struct tty_struct * tty)
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return; return;
} }
dbg(__FUNCTION__ " unsupported (at this time)"); dbg("%s unsupported (at this time)", __FUNCTION__);
return; return;
} }
...@@ -656,14 +656,14 @@ static void bluetooth_unthrottle (struct tty_struct * tty) ...@@ -656,14 +656,14 @@ static void bluetooth_unthrottle (struct tty_struct * tty)
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return; return;
} }
dbg(__FUNCTION__ " unsupported (at this time)"); dbg("%s unsupported (at this time)", __FUNCTION__);
} }
...@@ -675,10 +675,10 @@ static int bluetooth_ioctl (struct tty_struct *tty, struct file * file, unsigned ...@@ -675,10 +675,10 @@ static int bluetooth_ioctl (struct tty_struct *tty, struct file * file, unsigned
return -ENODEV; return -ENODEV;
} }
dbg(__FUNCTION__ " - cmd 0x%.4x", cmd); dbg("%s - cmd 0x%.4x", __FUNCTION__, cmd);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return -ENODEV; return -ENODEV;
} }
...@@ -695,10 +695,10 @@ static void bluetooth_set_termios (struct tty_struct *tty, struct termios * old) ...@@ -695,10 +695,10 @@ static void bluetooth_set_termios (struct tty_struct *tty, struct termios * old)
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return; return;
} }
...@@ -717,10 +717,10 @@ void btusb_enable_bulk_read(struct tty_struct *tty){ ...@@ -717,10 +717,10 @@ void btusb_enable_bulk_read(struct tty_struct *tty){
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return; return;
} }
...@@ -731,7 +731,7 @@ void btusb_enable_bulk_read(struct tty_struct *tty){ ...@@ -731,7 +731,7 @@ void btusb_enable_bulk_read(struct tty_struct *tty){
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) 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 @@ void btusb_disable_bulk_read(struct tty_struct *tty){ ...@@ -742,10 +742,10 @@ void btusb_disable_bulk_read(struct tty_struct *tty){
return; return;
} }
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth->open_count) { if (!bluetooth->open_count) {
dbg (__FUNCTION__ " - device not open"); dbg ("%s - device not open", __FUNCTION__);
return; return;
} }
...@@ -768,27 +768,27 @@ static void bluetooth_int_callback (struct urb *urb) ...@@ -768,27 +768,27 @@ static void bluetooth_int_callback (struct urb *urb)
unsigned int count = urb->actual_length; unsigned int count = urb->actual_length;
unsigned int packet_size; unsigned int packet_size;
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth) { if (!bluetooth) {
dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
return; return;
} }
if (urb->status) { if (urb->status) {
dbg(__FUNCTION__ " - nonzero int status received: %d", urb->status); dbg("%s - nonzero int status received: %d", __FUNCTION__, urb->status);
return; return;
} }
if (!count) { if (!count) {
dbg(__FUNCTION__ " - zero length int"); dbg("%s - zero length int", __FUNCTION__);
return; return;
} }
#ifdef DEBUG #ifdef DEBUG
if (count) { 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) { for (i = 0; i < count; ++i) {
printk ("%.2x ", data[i]); printk ("%.2x ", data[i]);
} }
...@@ -818,7 +818,7 @@ static void bluetooth_int_callback (struct urb *urb) ...@@ -818,7 +818,7 @@ static void bluetooth_int_callback (struct urb *urb)
} }
if (bluetooth->int_packet_pos + count > EVENT_BUFFER_SIZE) { 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; bluetooth->int_packet_pos = 0;
return; return;
} }
...@@ -834,7 +834,7 @@ static void bluetooth_int_callback (struct urb *urb) ...@@ -834,7 +834,7 @@ static void bluetooth_int_callback (struct urb *urb)
return; return;
if (packet_size + EVENT_HDR_SIZE < bluetooth->int_packet_pos) { 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; bluetooth->int_packet_pos = 0;
return; return;
} }
...@@ -858,15 +858,15 @@ static void bluetooth_ctrl_callback (struct urb *urb) ...@@ -858,15 +858,15 @@ static void bluetooth_ctrl_callback (struct urb *urb)
{ {
struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth) { if (!bluetooth) {
dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
return; return;
} }
if (urb->status) { 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; return;
} }
} }
...@@ -882,30 +882,30 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -882,30 +882,30 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
int result; int result;
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth) { if (!bluetooth) {
dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
return; return;
} }
if (urb->status) { 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) { if (urb->status == -ENOENT) {
dbg(__FUNCTION__ " - URB canceled, won't reschedule"); dbg("%s - URB canceled, won't reschedule", __FUNCTION__);
return; return;
} }
goto exit; goto exit;
} }
if (!count) { if (!count) {
dbg(__FUNCTION__ " - zero length read bulk"); dbg("%s - zero length read bulk", __FUNCTION__);
goto exit; goto exit;
} }
#ifdef DEBUG #ifdef DEBUG
if (count) { 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) { for (i = 0; i < count; ++i) {
printk ("%.2x ", data[i]); printk ("%.2x ", data[i]);
} }
...@@ -922,7 +922,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -922,7 +922,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
return; return;
} }
...@@ -939,7 +939,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -939,7 +939,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
} }
if (bluetooth->bulk_packet_pos + count > ACL_BUFFER_SIZE) { 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; bluetooth->bulk_packet_pos = 0;
goto exit; goto exit;
} }
...@@ -956,7 +956,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -956,7 +956,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
} }
if (packet_size + ACL_HDR_SIZE < bluetooth->bulk_packet_pos) { 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; bluetooth->bulk_packet_pos = 0;
goto exit; goto exit;
} }
...@@ -983,7 +983,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb) ...@@ -983,7 +983,7 @@ static void bluetooth_read_bulk_callback (struct urb *urb)
bluetooth_read_bulk_callback, bluetooth); bluetooth_read_bulk_callback, bluetooth);
result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL); result = usb_submit_urb(bluetooth->read_urb, GFP_KERNEL);
if (result) if (result)
err (__FUNCTION__ " - failed resubmitting read urb, error %d", result); err ("%s - failed resubmitting read urb, error %d", __FUNCTION__, result);
return; return;
} }
...@@ -993,15 +993,15 @@ static void bluetooth_write_bulk_callback (struct urb *urb) ...@@ -993,15 +993,15 @@ static void bluetooth_write_bulk_callback (struct urb *urb)
{ {
struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__); struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)urb->context, __FUNCTION__);
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth) { if (!bluetooth) {
dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); dbg("%s - bad bluetooth pointer, exiting", __FUNCTION__);
return; return;
} }
if (urb->status) { 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; return;
} }
...@@ -1017,7 +1017,7 @@ static void bluetooth_softint(void *private) ...@@ -1017,7 +1017,7 @@ static void bluetooth_softint(void *private)
struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__); struct usb_bluetooth *bluetooth = get_usb_bluetooth ((struct usb_bluetooth *)private, __FUNCTION__);
struct tty_struct *tty; struct tty_struct *tty;
dbg(__FUNCTION__); dbg("%s", __FUNCTION__);
if (!bluetooth) { if (!bluetooth) {
return; return;
...@@ -1025,7 +1025,7 @@ static void bluetooth_softint(void *private) ...@@ -1025,7 +1025,7 @@ static void bluetooth_softint(void *private)
tty = bluetooth->tty; tty = bluetooth->tty;
if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) { 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); (tty->ldisc.write_wakeup)(tty);
} }
...@@ -1087,7 +1087,7 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum, ...@@ -1087,7 +1087,7 @@ static void * usb_bluetooth_probe(struct usb_device *dev, unsigned int ifnum,
if ((num_bulk_in != 1) || if ((num_bulk_in != 1) ||
(num_bulk_out != 1) || (num_bulk_out != 1) ||
(num_interrupt_in != 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; return NULL;
} }
...@@ -1327,7 +1327,7 @@ int usb_bluetooth_init(void) ...@@ -1327,7 +1327,7 @@ int usb_bluetooth_init(void)
bluetooth_tty_driver.init_termios = tty_std_termios; bluetooth_tty_driver.init_termios = tty_std_termios;
bluetooth_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; bluetooth_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
if (tty_register_driver (&bluetooth_tty_driver)) { if (tty_register_driver (&bluetooth_tty_driver)) {
err(__FUNCTION__ " - failed to register tty driver"); err("%s - failed to register tty driver", __FUNCTION__);
return -1; return -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment