diff options
Diffstat (limited to 'drivers/usb/serial/sierra.c')
-rw-r--r-- | drivers/usb/serial/sierra.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 07eabaf9f044..ed30adefff85 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c | |||
@@ -256,7 +256,7 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
256 | struct sierra_port_private *portdata; | 256 | struct sierra_port_private *portdata; |
257 | __u16 interface = 0; | 257 | __u16 interface = 0; |
258 | 258 | ||
259 | dbg("%s", __FUNCTION__); | 259 | dbg("%s", __func__); |
260 | 260 | ||
261 | portdata = usb_get_serial_port_data(port); | 261 | portdata = usb_get_serial_port_data(port); |
262 | 262 | ||
@@ -286,24 +286,24 @@ static int sierra_send_setup(struct usb_serial_port *port) | |||
286 | 286 | ||
287 | static void sierra_rx_throttle(struct usb_serial_port *port) | 287 | static void sierra_rx_throttle(struct usb_serial_port *port) |
288 | { | 288 | { |
289 | dbg("%s", __FUNCTION__); | 289 | dbg("%s", __func__); |
290 | } | 290 | } |
291 | 291 | ||
292 | static void sierra_rx_unthrottle(struct usb_serial_port *port) | 292 | static void sierra_rx_unthrottle(struct usb_serial_port *port) |
293 | { | 293 | { |
294 | dbg("%s", __FUNCTION__); | 294 | dbg("%s", __func__); |
295 | } | 295 | } |
296 | 296 | ||
297 | static void sierra_break_ctl(struct usb_serial_port *port, int break_state) | 297 | static void sierra_break_ctl(struct usb_serial_port *port, int break_state) |
298 | { | 298 | { |
299 | /* Unfortunately, I don't know how to send a break */ | 299 | /* Unfortunately, I don't know how to send a break */ |
300 | dbg("%s", __FUNCTION__); | 300 | dbg("%s", __func__); |
301 | } | 301 | } |
302 | 302 | ||
303 | static void sierra_set_termios(struct usb_serial_port *port, | 303 | static void sierra_set_termios(struct usb_serial_port *port, |
304 | struct ktermios *old_termios) | 304 | struct ktermios *old_termios) |
305 | { | 305 | { |
306 | dbg("%s", __FUNCTION__); | 306 | dbg("%s", __func__); |
307 | tty_termios_copy_hw(port->tty->termios, old_termios); | 307 | tty_termios_copy_hw(port->tty->termios, old_termios); |
308 | sierra_send_setup(port); | 308 | sierra_send_setup(port); |
309 | } | 309 | } |
@@ -357,14 +357,14 @@ static void sierra_outdat_callback(struct urb *urb) | |||
357 | int status = urb->status; | 357 | int status = urb->status; |
358 | unsigned long flags; | 358 | unsigned long flags; |
359 | 359 | ||
360 | dbg("%s - port %d", __FUNCTION__, port->number); | 360 | dbg("%s - port %d", __func__, port->number); |
361 | 361 | ||
362 | /* free up the transfer buffer, as usb_free_urb() does not do this */ | 362 | /* free up the transfer buffer, as usb_free_urb() does not do this */ |
363 | kfree(urb->transfer_buffer); | 363 | kfree(urb->transfer_buffer); |
364 | 364 | ||
365 | if (status) | 365 | if (status) |
366 | dbg("%s - nonzero write bulk status received: %d", | 366 | dbg("%s - nonzero write bulk status received: %d", |
367 | __FUNCTION__, status); | 367 | __func__, status); |
368 | 368 | ||
369 | spin_lock_irqsave(&portdata->lock, flags); | 369 | spin_lock_irqsave(&portdata->lock, flags); |
370 | --portdata->outstanding_urbs; | 370 | --portdata->outstanding_urbs; |
@@ -386,12 +386,12 @@ static int sierra_write(struct usb_serial_port *port, | |||
386 | 386 | ||
387 | portdata = usb_get_serial_port_data(port); | 387 | portdata = usb_get_serial_port_data(port); |
388 | 388 | ||
389 | dbg("%s: write (%d chars)", __FUNCTION__, count); | 389 | dbg("%s: write (%d chars)", __func__, count); |
390 | 390 | ||
391 | spin_lock_irqsave(&portdata->lock, flags); | 391 | spin_lock_irqsave(&portdata->lock, flags); |
392 | if (portdata->outstanding_urbs > N_OUT_URB) { | 392 | if (portdata->outstanding_urbs > N_OUT_URB) { |
393 | spin_unlock_irqrestore(&portdata->lock, flags); | 393 | spin_unlock_irqrestore(&portdata->lock, flags); |
394 | dbg("%s - write limit hit\n", __FUNCTION__); | 394 | dbg("%s - write limit hit\n", __func__); |
395 | return 0; | 395 | return 0; |
396 | } | 396 | } |
397 | portdata->outstanding_urbs++; | 397 | portdata->outstanding_urbs++; |
@@ -413,7 +413,7 @@ static int sierra_write(struct usb_serial_port *port, | |||
413 | 413 | ||
414 | memcpy(buffer, buf, count); | 414 | memcpy(buffer, buf, count); |
415 | 415 | ||
416 | usb_serial_debug_data(debug, &port->dev, __FUNCTION__, count, buffer); | 416 | usb_serial_debug_data(debug, &port->dev, __func__, count, buffer); |
417 | 417 | ||
418 | usb_fill_bulk_urb(urb, serial->dev, | 418 | usb_fill_bulk_urb(urb, serial->dev, |
419 | usb_sndbulkpipe(serial->dev, | 419 | usb_sndbulkpipe(serial->dev, |
@@ -424,7 +424,7 @@ static int sierra_write(struct usb_serial_port *port, | |||
424 | status = usb_submit_urb(urb, GFP_ATOMIC); | 424 | status = usb_submit_urb(urb, GFP_ATOMIC); |
425 | if (status) { | 425 | if (status) { |
426 | dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed " | 426 | dev_err(&port->dev, "%s - usb_submit_urb(write bulk) failed " |
427 | "with status = %d\n", __FUNCTION__, status); | 427 | "with status = %d\n", __func__, status); |
428 | count = status; | 428 | count = status; |
429 | goto error; | 429 | goto error; |
430 | } | 430 | } |
@@ -454,14 +454,14 @@ static void sierra_indat_callback(struct urb *urb) | |||
454 | unsigned char *data = urb->transfer_buffer; | 454 | unsigned char *data = urb->transfer_buffer; |
455 | int status = urb->status; | 455 | int status = urb->status; |
456 | 456 | ||
457 | dbg("%s: %p", __FUNCTION__, urb); | 457 | dbg("%s: %p", __func__, urb); |
458 | 458 | ||
459 | endpoint = usb_pipeendpoint(urb->pipe); | 459 | endpoint = usb_pipeendpoint(urb->pipe); |
460 | port = (struct usb_serial_port *) urb->context; | 460 | port = (struct usb_serial_port *) urb->context; |
461 | 461 | ||
462 | if (status) { | 462 | if (status) { |
463 | dbg("%s: nonzero status: %d on endpoint %02x.", | 463 | dbg("%s: nonzero status: %d on endpoint %02x.", |
464 | __FUNCTION__, status, endpoint); | 464 | __func__, status, endpoint); |
465 | } else { | 465 | } else { |
466 | tty = port->tty; | 466 | tty = port->tty; |
467 | if (urb->actual_length) { | 467 | if (urb->actual_length) { |
@@ -469,7 +469,7 @@ static void sierra_indat_callback(struct urb *urb) | |||
469 | tty_insert_flip_string(tty, data, urb->actual_length); | 469 | tty_insert_flip_string(tty, data, urb->actual_length); |
470 | tty_flip_buffer_push(tty); | 470 | tty_flip_buffer_push(tty); |
471 | } else { | 471 | } else { |
472 | dbg("%s: empty read urb received", __FUNCTION__); | 472 | dbg("%s: empty read urb received", __func__); |
473 | } | 473 | } |
474 | 474 | ||
475 | /* Resubmit urb so we continue receiving */ | 475 | /* Resubmit urb so we continue receiving */ |
@@ -491,15 +491,15 @@ static void sierra_instat_callback(struct urb *urb) | |||
491 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 491 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
492 | struct usb_serial *serial = port->serial; | 492 | struct usb_serial *serial = port->serial; |
493 | 493 | ||
494 | dbg("%s", __FUNCTION__); | 494 | dbg("%s", __func__); |
495 | dbg("%s: urb %p port %p has data %p", __FUNCTION__, urb, port, portdata); | 495 | dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); |
496 | 496 | ||
497 | if (status == 0) { | 497 | if (status == 0) { |
498 | struct usb_ctrlrequest *req_pkt = | 498 | struct usb_ctrlrequest *req_pkt = |
499 | (struct usb_ctrlrequest *)urb->transfer_buffer; | 499 | (struct usb_ctrlrequest *)urb->transfer_buffer; |
500 | 500 | ||
501 | if (!req_pkt) { | 501 | if (!req_pkt) { |
502 | dbg("%s: NULL req_pkt\n", __FUNCTION__); | 502 | dbg("%s: NULL req_pkt\n", __func__); |
503 | return; | 503 | return; |
504 | } | 504 | } |
505 | if ((req_pkt->bRequestType == 0xA1) && | 505 | if ((req_pkt->bRequestType == 0xA1) && |
@@ -509,7 +509,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
509 | urb->transfer_buffer + | 509 | urb->transfer_buffer + |
510 | sizeof(struct usb_ctrlrequest)); | 510 | sizeof(struct usb_ctrlrequest)); |
511 | 511 | ||
512 | dbg("%s: signal x%x", __FUNCTION__, signals); | 512 | dbg("%s: signal x%x", __func__, signals); |
513 | 513 | ||
514 | old_dcd_state = portdata->dcd_state; | 514 | old_dcd_state = portdata->dcd_state; |
515 | portdata->cts_state = 1; | 515 | portdata->cts_state = 1; |
@@ -521,11 +521,11 @@ static void sierra_instat_callback(struct urb *urb) | |||
521 | old_dcd_state && !portdata->dcd_state) | 521 | old_dcd_state && !portdata->dcd_state) |
522 | tty_hangup(port->tty); | 522 | tty_hangup(port->tty); |
523 | } else { | 523 | } else { |
524 | dbg("%s: type %x req %x", __FUNCTION__, | 524 | dbg("%s: type %x req %x", __func__, |
525 | req_pkt->bRequestType, req_pkt->bRequest); | 525 | req_pkt->bRequestType, req_pkt->bRequest); |
526 | } | 526 | } |
527 | } else | 527 | } else |
528 | dbg("%s: error %d", __FUNCTION__, status); | 528 | dbg("%s: error %d", __func__, status); |
529 | 529 | ||
530 | /* Resubmit urb so we continue receiving IRQ data */ | 530 | /* Resubmit urb so we continue receiving IRQ data */ |
531 | if (status != -ESHUTDOWN) { | 531 | if (status != -ESHUTDOWN) { |
@@ -533,7 +533,7 @@ static void sierra_instat_callback(struct urb *urb) | |||
533 | err = usb_submit_urb(urb, GFP_ATOMIC); | 533 | err = usb_submit_urb(urb, GFP_ATOMIC); |
534 | if (err) | 534 | if (err) |
535 | dbg("%s: resubmit intr urb failed. (%d)", | 535 | dbg("%s: resubmit intr urb failed. (%d)", |
536 | __FUNCTION__, err); | 536 | __func__, err); |
537 | } | 537 | } |
538 | } | 538 | } |
539 | 539 | ||
@@ -542,14 +542,14 @@ static int sierra_write_room(struct usb_serial_port *port) | |||
542 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); | 542 | struct sierra_port_private *portdata = usb_get_serial_port_data(port); |
543 | unsigned long flags; | 543 | unsigned long flags; |
544 | 544 | ||
545 | dbg("%s - port %d", __FUNCTION__, port->number); | 545 | dbg("%s - port %d", __func__, port->number); |
546 | 546 | ||
547 | /* try to give a good number back based on if we have any free urbs at | 547 | /* try to give a good number back based on if we have any free urbs at |
548 | * this point in time */ | 548 | * this point in time */ |
549 | spin_lock_irqsave(&portdata->lock, flags); | 549 | spin_lock_irqsave(&portdata->lock, flags); |
550 | if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) { | 550 | if (portdata->outstanding_urbs > N_OUT_URB * 2 / 3) { |
551 | spin_unlock_irqrestore(&portdata->lock, flags); | 551 | spin_unlock_irqrestore(&portdata->lock, flags); |
552 | dbg("%s - write limit hit\n", __FUNCTION__); | 552 | dbg("%s - write limit hit\n", __func__); |
553 | return 0; | 553 | return 0; |
554 | } | 554 | } |
555 | spin_unlock_irqrestore(&portdata->lock, flags); | 555 | spin_unlock_irqrestore(&portdata->lock, flags); |
@@ -559,7 +559,7 @@ static int sierra_write_room(struct usb_serial_port *port) | |||
559 | 559 | ||
560 | static int sierra_chars_in_buffer(struct usb_serial_port *port) | 560 | static int sierra_chars_in_buffer(struct usb_serial_port *port) |
561 | { | 561 | { |
562 | dbg("%s - port %d", __FUNCTION__, port->number); | 562 | dbg("%s - port %d", __func__, port->number); |
563 | 563 | ||
564 | /* | 564 | /* |
565 | * We can't really account for how much data we | 565 | * We can't really account for how much data we |
@@ -580,7 +580,7 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp) | |||
580 | 580 | ||
581 | portdata = usb_get_serial_port_data(port); | 581 | portdata = usb_get_serial_port_data(port); |
582 | 582 | ||
583 | dbg("%s", __FUNCTION__); | 583 | dbg("%s", __func__); |
584 | 584 | ||
585 | /* Set some sane defaults */ | 585 | /* Set some sane defaults */ |
586 | portdata->rts_state = 1; | 586 | portdata->rts_state = 1; |
@@ -592,7 +592,7 @@ static int sierra_open(struct usb_serial_port *port, struct file *filp) | |||
592 | if (!urb) | 592 | if (!urb) |
593 | continue; | 593 | continue; |
594 | if (urb->dev != serial->dev) { | 594 | if (urb->dev != serial->dev) { |
595 | dbg("%s: dev %p != %p", __FUNCTION__, | 595 | dbg("%s: dev %p != %p", __func__, |
596 | urb->dev, serial->dev); | 596 | urb->dev, serial->dev); |
597 | continue; | 597 | continue; |
598 | } | 598 | } |
@@ -630,7 +630,7 @@ static void sierra_close(struct usb_serial_port *port, struct file *filp) | |||
630 | struct usb_serial *serial = port->serial; | 630 | struct usb_serial *serial = port->serial; |
631 | struct sierra_port_private *portdata; | 631 | struct sierra_port_private *portdata; |
632 | 632 | ||
633 | dbg("%s", __FUNCTION__); | 633 | dbg("%s", __func__); |
634 | portdata = usb_get_serial_port_data(port); | 634 | portdata = usb_get_serial_port_data(port); |
635 | 635 | ||
636 | portdata->rts_state = 0; | 636 | portdata->rts_state = 0; |
@@ -660,7 +660,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
660 | int i; | 660 | int i; |
661 | int j; | 661 | int j; |
662 | 662 | ||
663 | dbg("%s", __FUNCTION__); | 663 | dbg("%s", __func__); |
664 | 664 | ||
665 | /* Set Device mode to D0 */ | 665 | /* Set Device mode to D0 */ |
666 | sierra_set_power_state(serial->dev, 0x0000); | 666 | sierra_set_power_state(serial->dev, 0x0000); |
@@ -675,7 +675,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
675 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); | 675 | portdata = kzalloc(sizeof(*portdata), GFP_KERNEL); |
676 | if (!portdata) { | 676 | if (!portdata) { |
677 | dbg("%s: kmalloc for sierra_port_private (%d) failed!.", | 677 | dbg("%s: kmalloc for sierra_port_private (%d) failed!.", |
678 | __FUNCTION__, i); | 678 | __func__, i); |
679 | return -ENOMEM; | 679 | return -ENOMEM; |
680 | } | 680 | } |
681 | spin_lock_init(&portdata->lock); | 681 | spin_lock_init(&portdata->lock); |
@@ -696,7 +696,7 @@ static int sierra_startup(struct usb_serial *serial) | |||
696 | urb = usb_alloc_urb(0, GFP_KERNEL); | 696 | urb = usb_alloc_urb(0, GFP_KERNEL); |
697 | if (urb == NULL) { | 697 | if (urb == NULL) { |
698 | dbg("%s: alloc for in port failed.", | 698 | dbg("%s: alloc for in port failed.", |
699 | __FUNCTION__); | 699 | __func__); |
700 | continue; | 700 | continue; |
701 | } | 701 | } |
702 | /* Fill URB using supplied data. */ | 702 | /* Fill URB using supplied data. */ |
@@ -718,7 +718,7 @@ static void sierra_shutdown(struct usb_serial *serial) | |||
718 | struct usb_serial_port *port; | 718 | struct usb_serial_port *port; |
719 | struct sierra_port_private *portdata; | 719 | struct sierra_port_private *portdata; |
720 | 720 | ||
721 | dbg("%s", __FUNCTION__); | 721 | dbg("%s", __func__); |
722 | 722 | ||
723 | for (i = 0; i < serial->num_ports; ++i) { | 723 | for (i = 0; i < serial->num_ports; ++i) { |
724 | port = serial->port[i]; | 724 | port = serial->port[i]; |