aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-03-03 19:08:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:55 -0400
commit441b62c1edb986827154768d89bbac0ba779984f (patch)
tree13724c22d1b190a36f0ddbba38554e6c66bea6af /drivers/usb/serial/aircable.c
parent14722ef4acedc643f0b78b7165ceff2d300dae4d (diff)
USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r--drivers/usb/serial/aircable.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 1cd29cd6bd00..a238817762ad 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -210,7 +210,7 @@ static void aircable_send(struct usb_serial_port *port)
210 struct aircable_private *priv = usb_get_serial_port_data(port); 210 struct aircable_private *priv = usb_get_serial_port_data(port);
211 unsigned char* buf; 211 unsigned char* buf;
212 u16 *dbuf; 212 u16 *dbuf;
213 dbg("%s - port %d", __FUNCTION__, port->number); 213 dbg("%s - port %d", __func__, port->number);
214 if (port->write_urb_busy) 214 if (port->write_urb_busy)
215 return; 215 return;
216 216
@@ -220,7 +220,7 @@ static void aircable_send(struct usb_serial_port *port)
220 220
221 buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC); 221 buf = kzalloc(count + HCI_HEADER_LENGTH, GFP_ATOMIC);
222 if (!buf) { 222 if (!buf) {
223 err("%s- kzalloc(%d) failed.", __FUNCTION__, 223 err("%s- kzalloc(%d) failed.", __func__,
224 count + HCI_HEADER_LENGTH); 224 count + HCI_HEADER_LENGTH);
225 return; 225 return;
226 } 226 }
@@ -236,7 +236,7 @@ static void aircable_send(struct usb_serial_port *port)
236 236
237 kfree(buf); 237 kfree(buf);
238 port->write_urb_busy = 1; 238 port->write_urb_busy = 1;
239 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 239 usb_serial_debug_data(debug, &port->dev, __func__,
240 count + HCI_HEADER_LENGTH, 240 count + HCI_HEADER_LENGTH,
241 port->write_urb->transfer_buffer); 241 port->write_urb->transfer_buffer);
242 port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH; 242 port->write_urb->transfer_buffer_length = count + HCI_HEADER_LENGTH;
@@ -246,7 +246,7 @@ static void aircable_send(struct usb_serial_port *port)
246 if (result) { 246 if (result) {
247 dev_err(&port->dev, 247 dev_err(&port->dev,
248 "%s - failed submitting write urb, error %d\n", 248 "%s - failed submitting write urb, error %d\n",
249 __FUNCTION__, result); 249 __func__, result);
250 port->write_urb_busy = 0; 250 port->write_urb_busy = 0;
251 } 251 }
252 252
@@ -275,7 +275,7 @@ static void aircable_read(struct work_struct *work)
275 275
276 if (!tty) { 276 if (!tty) {
277 schedule_work(&priv->rx_work); 277 schedule_work(&priv->rx_work);
278 err("%s - No tty available", __FUNCTION__); 278 err("%s - No tty available", __func__);
279 return ; 279 return ;
280 } 280 }
281 281
@@ -286,7 +286,7 @@ static void aircable_read(struct work_struct *work)
286 286
287 tty_prepare_flip_string(tty, &data, count); 287 tty_prepare_flip_string(tty, &data, count);
288 if (!data){ 288 if (!data){
289 err("%s- kzalloc(%d) failed.", __FUNCTION__, count); 289 err("%s- kzalloc(%d) failed.", __func__, count);
290 return; 290 return;
291 } 291 }
292 292
@@ -332,7 +332,7 @@ static int aircable_attach (struct usb_serial *serial)
332 332
333 priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL); 333 priv = kzalloc(sizeof(struct aircable_private), GFP_KERNEL);
334 if (!priv){ 334 if (!priv){
335 err("%s- kmalloc(%Zd) failed.", __FUNCTION__, 335 err("%s- kmalloc(%Zd) failed.", __func__,
336 sizeof(struct aircable_private)); 336 sizeof(struct aircable_private));
337 return -ENOMEM; 337 return -ENOMEM;
338 } 338 }
@@ -366,7 +366,7 @@ static void aircable_shutdown(struct usb_serial *serial)
366 struct usb_serial_port *port = serial->port[0]; 366 struct usb_serial_port *port = serial->port[0];
367 struct aircable_private *priv = usb_get_serial_port_data(port); 367 struct aircable_private *priv = usb_get_serial_port_data(port);
368 368
369 dbg("%s", __FUNCTION__); 369 dbg("%s", __func__);
370 370
371 if (priv) { 371 if (priv) {
372 serial_buf_free(priv->tx_buf); 372 serial_buf_free(priv->tx_buf);
@@ -388,12 +388,12 @@ static int aircable_write(struct usb_serial_port *port,
388 struct aircable_private *priv = usb_get_serial_port_data(port); 388 struct aircable_private *priv = usb_get_serial_port_data(port);
389 int temp; 389 int temp;
390 390
391 dbg("%s - port %d, %d bytes", __FUNCTION__, port->number, count); 391 dbg("%s - port %d, %d bytes", __func__, port->number, count);
392 392
393 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, source); 393 usb_serial_debug_data(debug, &port->dev, __func__, count, source);
394 394
395 if (!count){ 395 if (!count){
396 dbg("%s - write request of 0 bytes", __FUNCTION__); 396 dbg("%s - write request of 0 bytes", __func__);
397 return count; 397 return count;
398 } 398 }
399 399
@@ -414,7 +414,7 @@ static void aircable_write_bulk_callback(struct urb *urb)
414 int status = urb->status; 414 int status = urb->status;
415 int result; 415 int result;
416 416
417 dbg("%s - urb status: %d", __FUNCTION__ , status); 417 dbg("%s - urb status: %d", __func__ , status);
418 418
419 /* This has been taken from cypress_m8.c cypress_write_int_callback */ 419 /* This has been taken from cypress_m8.c cypress_write_int_callback */
420 switch (status) { 420 switch (status) {
@@ -426,21 +426,21 @@ static void aircable_write_bulk_callback(struct urb *urb)
426 case -ESHUTDOWN: 426 case -ESHUTDOWN:
427 /* this urb is terminated, clean up */ 427 /* this urb is terminated, clean up */
428 dbg("%s - urb shutting down with status: %d", 428 dbg("%s - urb shutting down with status: %d",
429 __FUNCTION__, status); 429 __func__, status);
430 port->write_urb_busy = 0; 430 port->write_urb_busy = 0;
431 return; 431 return;
432 default: 432 default:
433 /* error in the urb, so we have to resubmit it */ 433 /* error in the urb, so we have to resubmit it */
434 dbg("%s - Overflow in write", __FUNCTION__); 434 dbg("%s - Overflow in write", __func__);
435 dbg("%s - nonzero write bulk status received: %d", 435 dbg("%s - nonzero write bulk status received: %d",
436 __FUNCTION__, status); 436 __func__, status);
437 port->write_urb->transfer_buffer_length = 1; 437 port->write_urb->transfer_buffer_length = 1;
438 port->write_urb->dev = port->serial->dev; 438 port->write_urb->dev = port->serial->dev;
439 result = usb_submit_urb(port->write_urb, GFP_ATOMIC); 439 result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
440 if (result) 440 if (result)
441 dev_err(&urb->dev->dev, 441 dev_err(&urb->dev->dev,
442 "%s - failed resubmitting write urb, error %d\n", 442 "%s - failed resubmitting write urb, error %d\n",
443 __FUNCTION__, result); 443 __func__, result);
444 else 444 else
445 return; 445 return;
446 } 446 }
@@ -460,17 +460,17 @@ static void aircable_read_bulk_callback(struct urb *urb)
460 unsigned char *temp; 460 unsigned char *temp;
461 int status = urb->status; 461 int status = urb->status;
462 462
463 dbg("%s - port %d", __FUNCTION__, port->number); 463 dbg("%s - port %d", __func__, port->number);
464 464
465 if (status) { 465 if (status) {
466 dbg("%s - urb status = %d", __FUNCTION__, status); 466 dbg("%s - urb status = %d", __func__, status);
467 if (!port->open_count) { 467 if (!port->open_count) {
468 dbg("%s - port is closed, exiting.", __FUNCTION__); 468 dbg("%s - port is closed, exiting.", __func__);
469 return; 469 return;
470 } 470 }
471 if (status == -EPROTO) { 471 if (status == -EPROTO) {
472 dbg("%s - caught -EPROTO, resubmitting the urb", 472 dbg("%s - caught -EPROTO, resubmitting the urb",
473 __FUNCTION__); 473 __func__);
474 usb_fill_bulk_urb(port->read_urb, port->serial->dev, 474 usb_fill_bulk_urb(port->read_urb, port->serial->dev,
475 usb_rcvbulkpipe(port->serial->dev, 475 usb_rcvbulkpipe(port->serial->dev,
476 port->bulk_in_endpointAddress), 476 port->bulk_in_endpointAddress),
@@ -482,14 +482,14 @@ static void aircable_read_bulk_callback(struct urb *urb)
482 if (result) 482 if (result)
483 dev_err(&urb->dev->dev, 483 dev_err(&urb->dev->dev,
484 "%s - failed resubmitting read urb, error %d\n", 484 "%s - failed resubmitting read urb, error %d\n",
485 __FUNCTION__, result); 485 __func__, result);
486 return; 486 return;
487 } 487 }
488 dbg("%s - unable to handle the error, exiting.", __FUNCTION__); 488 dbg("%s - unable to handle the error, exiting.", __func__);
489 return; 489 return;
490 } 490 }
491 491
492 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, 492 usb_serial_debug_data(debug, &port->dev, __func__,
493 urb->actual_length,urb->transfer_buffer); 493 urb->actual_length,urb->transfer_buffer);
494 494
495 tty = port->tty; 495 tty = port->tty;
@@ -538,7 +538,7 @@ static void aircable_read_bulk_callback(struct urb *urb)
538 if (result) 538 if (result)
539 dev_err(&urb->dev->dev, 539 dev_err(&urb->dev->dev,
540 "%s - failed resubmitting read urb, error %d\n", 540 "%s - failed resubmitting read urb, error %d\n",
541 __FUNCTION__, result); 541 __func__, result);
542 } 542 }
543 543
544 return; 544 return;
@@ -550,7 +550,7 @@ static void aircable_throttle(struct usb_serial_port *port)
550 struct aircable_private *priv = usb_get_serial_port_data(port); 550 struct aircable_private *priv = usb_get_serial_port_data(port);
551 unsigned long flags; 551 unsigned long flags;
552 552
553 dbg("%s - port %d", __FUNCTION__, port->number); 553 dbg("%s - port %d", __func__, port->number);
554 554
555 spin_lock_irqsave(&priv->rx_lock, flags); 555 spin_lock_irqsave(&priv->rx_lock, flags);
556 priv->rx_flags |= THROTTLED; 556 priv->rx_flags |= THROTTLED;
@@ -564,7 +564,7 @@ static void aircable_unthrottle(struct usb_serial_port *port)
564 int actually_throttled; 564 int actually_throttled;
565 unsigned long flags; 565 unsigned long flags;
566 566
567 dbg("%s - port %d", __FUNCTION__, port->number); 567 dbg("%s - port %d", __func__, port->number);
568 568
569 spin_lock_irqsave(&priv->rx_lock, flags); 569 spin_lock_irqsave(&priv->rx_lock, flags);
570 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED; 570 actually_throttled = priv->rx_flags & ACTUALLY_THROTTLED;