aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cp2101.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/cp2101.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/cp2101.c')
-rw-r--r--drivers/usb/serial/cp2101.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index 2af8d21bb121..dc0ea08ed231 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -193,7 +193,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
193 193
194 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL); 194 buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
195 if (!buf) { 195 if (!buf) {
196 dev_err(&port->dev, "%s - out of memory.\n", __FUNCTION__); 196 dev_err(&port->dev, "%s - out of memory.\n", __func__);
197 return -ENOMEM; 197 return -ENOMEM;
198 } 198 }
199 199
@@ -214,7 +214,7 @@ static int cp2101_get_config(struct usb_serial_port* port, u8 request,
214 if (result != size) { 214 if (result != size) {
215 dev_err(&port->dev, "%s - Unable to send config request, " 215 dev_err(&port->dev, "%s - Unable to send config request, "
216 "request=0x%x size=%d result=%d\n", 216 "request=0x%x size=%d result=%d\n",
217 __FUNCTION__, request, size, result); 217 __func__, request, size, result);
218 return -EPROTO; 218 return -EPROTO;
219 } 219 }
220 220
@@ -240,7 +240,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
240 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL); 240 buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
241 if (!buf) { 241 if (!buf) {
242 dev_err(&port->dev, "%s - out of memory.\n", 242 dev_err(&port->dev, "%s - out of memory.\n",
243 __FUNCTION__); 243 __func__);
244 return -ENOMEM; 244 return -ENOMEM;
245 } 245 }
246 246
@@ -265,7 +265,7 @@ static int cp2101_set_config(struct usb_serial_port* port, u8 request,
265 if ((size > 2 && result != size) || result < 0) { 265 if ((size > 2 && result != size) || result < 0) {
266 dev_err(&port->dev, "%s - Unable to send request, " 266 dev_err(&port->dev, "%s - Unable to send request, "
267 "request=0x%x size=%d result=%d\n", 267 "request=0x%x size=%d result=%d\n",
268 __FUNCTION__, request, size, result); 268 __func__, request, size, result);
269 return -EPROTO; 269 return -EPROTO;
270 } 270 }
271 271
@@ -293,11 +293,11 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
293 struct usb_serial *serial = port->serial; 293 struct usb_serial *serial = port->serial;
294 int result; 294 int result;
295 295
296 dbg("%s - port %d", __FUNCTION__, port->number); 296 dbg("%s - port %d", __func__, port->number);
297 297
298 if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) { 298 if (cp2101_set_config_single(port, CP2101_UART, UART_ENABLE)) {
299 dev_err(&port->dev, "%s - Unable to enable UART\n", 299 dev_err(&port->dev, "%s - Unable to enable UART\n",
300 __FUNCTION__); 300 __func__);
301 return -EPROTO; 301 return -EPROTO;
302 } 302 }
303 303
@@ -312,7 +312,7 @@ static int cp2101_open (struct usb_serial_port *port, struct file *filp)
312 result = usb_submit_urb(port->read_urb, GFP_KERNEL); 312 result = usb_submit_urb(port->read_urb, GFP_KERNEL);
313 if (result) { 313 if (result) {
314 dev_err(&port->dev, "%s - failed resubmitting read urb, " 314 dev_err(&port->dev, "%s - failed resubmitting read urb, "
315 "error %d\n", __FUNCTION__, result); 315 "error %d\n", __func__, result);
316 return result; 316 return result;
317 } 317 }
318 318
@@ -329,7 +329,7 @@ static void cp2101_cleanup (struct usb_serial_port *port)
329{ 329{
330 struct usb_serial *serial = port->serial; 330 struct usb_serial *serial = port->serial;
331 331
332 dbg("%s - port %d", __FUNCTION__, port->number); 332 dbg("%s - port %d", __func__, port->number);
333 333
334 if (serial->dev) { 334 if (serial->dev) {
335 /* shutdown any bulk reads that might be going on */ 335 /* shutdown any bulk reads that might be going on */
@@ -342,10 +342,10 @@ static void cp2101_cleanup (struct usb_serial_port *port)
342 342
343static void cp2101_close (struct usb_serial_port *port, struct file * filp) 343static void cp2101_close (struct usb_serial_port *port, struct file * filp)
344{ 344{
345 dbg("%s - port %d", __FUNCTION__, port->number); 345 dbg("%s - port %d", __func__, port->number);
346 346
347 /* shutdown our urbs */ 347 /* shutdown our urbs */
348 dbg("%s - shutting down urbs", __FUNCTION__); 348 dbg("%s - shutting down urbs", __func__);
349 usb_kill_urb(port->write_urb); 349 usb_kill_urb(port->write_urb);
350 usb_kill_urb(port->read_urb); 350 usb_kill_urb(port->read_urb);
351 351
@@ -367,10 +367,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
367 int baud; 367 int baud;
368 int bits; 368 int bits;
369 369
370 dbg("%s - port %d", __FUNCTION__, port->number); 370 dbg("%s - port %d", __func__, port->number);
371 371
372 if (!port->tty || !port->tty->termios) { 372 if (!port->tty || !port->tty->termios) {
373 dbg("%s - no tty structures", __FUNCTION__); 373 dbg("%s - no tty structures", __func__);
374 return; 374 return;
375 } 375 }
376 376
@@ -379,7 +379,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
379 if (baud) 379 if (baud)
380 baud = BAUD_RATE_GEN_FREQ / baud; 380 baud = BAUD_RATE_GEN_FREQ / baud;
381 381
382 dbg("%s - baud rate = %d", __FUNCTION__, baud); 382 dbg("%s - baud rate = %d", __func__, baud);
383 383
384 tty_encode_baud_rate(port->tty, baud, baud); 384 tty_encode_baud_rate(port->tty, baud, baud);
385 cflag = port->tty->termios->c_cflag; 385 cflag = port->tty->termios->c_cflag;
@@ -388,24 +388,24 @@ static void cp2101_get_termios (struct usb_serial_port *port)
388 cflag &= ~CSIZE; 388 cflag &= ~CSIZE;
389 switch(bits & BITS_DATA_MASK) { 389 switch(bits & BITS_DATA_MASK) {
390 case BITS_DATA_5: 390 case BITS_DATA_5:
391 dbg("%s - data bits = 5", __FUNCTION__); 391 dbg("%s - data bits = 5", __func__);
392 cflag |= CS5; 392 cflag |= CS5;
393 break; 393 break;
394 case BITS_DATA_6: 394 case BITS_DATA_6:
395 dbg("%s - data bits = 6", __FUNCTION__); 395 dbg("%s - data bits = 6", __func__);
396 cflag |= CS6; 396 cflag |= CS6;
397 break; 397 break;
398 case BITS_DATA_7: 398 case BITS_DATA_7:
399 dbg("%s - data bits = 7", __FUNCTION__); 399 dbg("%s - data bits = 7", __func__);
400 cflag |= CS7; 400 cflag |= CS7;
401 break; 401 break;
402 case BITS_DATA_8: 402 case BITS_DATA_8:
403 dbg("%s - data bits = 8", __FUNCTION__); 403 dbg("%s - data bits = 8", __func__);
404 cflag |= CS8; 404 cflag |= CS8;
405 break; 405 break;
406 case BITS_DATA_9: 406 case BITS_DATA_9:
407 dbg("%s - data bits = 9 (not supported, " 407 dbg("%s - data bits = 9 (not supported, "
408 "using 8 data bits)", __FUNCTION__); 408 "using 8 data bits)", __func__);
409 cflag |= CS8; 409 cflag |= CS8;
410 bits &= ~BITS_DATA_MASK; 410 bits &= ~BITS_DATA_MASK;
411 bits |= BITS_DATA_8; 411 bits |= BITS_DATA_8;
@@ -413,7 +413,7 @@ static void cp2101_get_termios (struct usb_serial_port *port)
413 break; 413 break;
414 default: 414 default:
415 dbg("%s - Unknown number of data bits, " 415 dbg("%s - Unknown number of data bits, "
416 "using 8", __FUNCTION__); 416 "using 8", __func__);
417 cflag |= CS8; 417 cflag |= CS8;
418 bits &= ~BITS_DATA_MASK; 418 bits &= ~BITS_DATA_MASK;
419 bits |= BITS_DATA_8; 419 bits |= BITS_DATA_8;
@@ -423,35 +423,35 @@ static void cp2101_get_termios (struct usb_serial_port *port)
423 423
424 switch(bits & BITS_PARITY_MASK) { 424 switch(bits & BITS_PARITY_MASK) {
425 case BITS_PARITY_NONE: 425 case BITS_PARITY_NONE:
426 dbg("%s - parity = NONE", __FUNCTION__); 426 dbg("%s - parity = NONE", __func__);
427 cflag &= ~PARENB; 427 cflag &= ~PARENB;
428 break; 428 break;
429 case BITS_PARITY_ODD: 429 case BITS_PARITY_ODD:
430 dbg("%s - parity = ODD", __FUNCTION__); 430 dbg("%s - parity = ODD", __func__);
431 cflag |= (PARENB|PARODD); 431 cflag |= (PARENB|PARODD);
432 break; 432 break;
433 case BITS_PARITY_EVEN: 433 case BITS_PARITY_EVEN:
434 dbg("%s - parity = EVEN", __FUNCTION__); 434 dbg("%s - parity = EVEN", __func__);
435 cflag &= ~PARODD; 435 cflag &= ~PARODD;
436 cflag |= PARENB; 436 cflag |= PARENB;
437 break; 437 break;
438 case BITS_PARITY_MARK: 438 case BITS_PARITY_MARK:
439 dbg("%s - parity = MARK (not supported, " 439 dbg("%s - parity = MARK (not supported, "
440 "disabling parity)", __FUNCTION__); 440 "disabling parity)", __func__);
441 cflag &= ~PARENB; 441 cflag &= ~PARENB;
442 bits &= ~BITS_PARITY_MASK; 442 bits &= ~BITS_PARITY_MASK;
443 cp2101_set_config(port, CP2101_BITS, &bits, 2); 443 cp2101_set_config(port, CP2101_BITS, &bits, 2);
444 break; 444 break;
445 case BITS_PARITY_SPACE: 445 case BITS_PARITY_SPACE:
446 dbg("%s - parity = SPACE (not supported, " 446 dbg("%s - parity = SPACE (not supported, "
447 "disabling parity)", __FUNCTION__); 447 "disabling parity)", __func__);
448 cflag &= ~PARENB; 448 cflag &= ~PARENB;
449 bits &= ~BITS_PARITY_MASK; 449 bits &= ~BITS_PARITY_MASK;
450 cp2101_set_config(port, CP2101_BITS, &bits, 2); 450 cp2101_set_config(port, CP2101_BITS, &bits, 2);
451 break; 451 break;
452 default: 452 default:
453 dbg("%s - Unknown parity mode, " 453 dbg("%s - Unknown parity mode, "
454 "disabling parity", __FUNCTION__); 454 "disabling parity", __func__);
455 cflag &= ~PARENB; 455 cflag &= ~PARENB;
456 bits &= ~BITS_PARITY_MASK; 456 bits &= ~BITS_PARITY_MASK;
457 cp2101_set_config(port, CP2101_BITS, &bits, 2); 457 cp2101_set_config(port, CP2101_BITS, &bits, 2);
@@ -461,21 +461,21 @@ static void cp2101_get_termios (struct usb_serial_port *port)
461 cflag &= ~CSTOPB; 461 cflag &= ~CSTOPB;
462 switch(bits & BITS_STOP_MASK) { 462 switch(bits & BITS_STOP_MASK) {
463 case BITS_STOP_1: 463 case BITS_STOP_1:
464 dbg("%s - stop bits = 1", __FUNCTION__); 464 dbg("%s - stop bits = 1", __func__);
465 break; 465 break;
466 case BITS_STOP_1_5: 466 case BITS_STOP_1_5:
467 dbg("%s - stop bits = 1.5 (not supported, " 467 dbg("%s - stop bits = 1.5 (not supported, "
468 "using 1 stop bit)", __FUNCTION__); 468 "using 1 stop bit)", __func__);
469 bits &= ~BITS_STOP_MASK; 469 bits &= ~BITS_STOP_MASK;
470 cp2101_set_config(port, CP2101_BITS, &bits, 2); 470 cp2101_set_config(port, CP2101_BITS, &bits, 2);
471 break; 471 break;
472 case BITS_STOP_2: 472 case BITS_STOP_2:
473 dbg("%s - stop bits = 2", __FUNCTION__); 473 dbg("%s - stop bits = 2", __func__);
474 cflag |= CSTOPB; 474 cflag |= CSTOPB;
475 break; 475 break;
476 default: 476 default:
477 dbg("%s - Unknown number of stop bits, " 477 dbg("%s - Unknown number of stop bits, "
478 "using 1 stop bit", __FUNCTION__); 478 "using 1 stop bit", __func__);
479 bits &= ~BITS_STOP_MASK; 479 bits &= ~BITS_STOP_MASK;
480 cp2101_set_config(port, CP2101_BITS, &bits, 2); 480 cp2101_set_config(port, CP2101_BITS, &bits, 2);
481 break; 481 break;
@@ -483,10 +483,10 @@ static void cp2101_get_termios (struct usb_serial_port *port)
483 483
484 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16); 484 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
485 if (modem_ctl[0] & 0x0008) { 485 if (modem_ctl[0] & 0x0008) {
486 dbg("%s - flow control = CRTSCTS", __FUNCTION__); 486 dbg("%s - flow control = CRTSCTS", __func__);
487 cflag |= CRTSCTS; 487 cflag |= CRTSCTS;
488 } else { 488 } else {
489 dbg("%s - flow control = NONE", __FUNCTION__); 489 dbg("%s - flow control = NONE", __func__);
490 cflag &= ~CRTSCTS; 490 cflag &= ~CRTSCTS;
491 } 491 }
492 492
@@ -500,10 +500,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
500 int baud=0, bits; 500 int baud=0, bits;
501 unsigned int modem_ctl[4]; 501 unsigned int modem_ctl[4];
502 502
503 dbg("%s - port %d", __FUNCTION__, port->number); 503 dbg("%s - port %d", __func__, port->number);
504 504
505 if (!port->tty || !port->tty->termios) { 505 if (!port->tty || !port->tty->termios) {
506 dbg("%s - no tty structures", __FUNCTION__); 506 dbg("%s - no tty structures", __func__);
507 return; 507 return;
508 } 508 }
509 port->tty->termios->c_cflag &= ~CMSPAR; 509 port->tty->termios->c_cflag &= ~CMSPAR;
@@ -542,7 +542,7 @@ static void cp2101_set_termios (struct usb_serial_port *port,
542 } 542 }
543 543
544 if (baud) { 544 if (baud) {
545 dbg("%s - Setting baud rate to %d baud", __FUNCTION__, 545 dbg("%s - Setting baud rate to %d baud", __func__,
546 baud); 546 baud);
547 if (cp2101_set_config_single(port, CP2101_BAUDRATE, 547 if (cp2101_set_config_single(port, CP2101_BAUDRATE,
548 (BAUD_RATE_GEN_FREQ / baud))) { 548 (BAUD_RATE_GEN_FREQ / baud))) {
@@ -562,23 +562,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
562 switch (cflag & CSIZE) { 562 switch (cflag & CSIZE) {
563 case CS5: 563 case CS5:
564 bits |= BITS_DATA_5; 564 bits |= BITS_DATA_5;
565 dbg("%s - data bits = 5", __FUNCTION__); 565 dbg("%s - data bits = 5", __func__);
566 break; 566 break;
567 case CS6: 567 case CS6:
568 bits |= BITS_DATA_6; 568 bits |= BITS_DATA_6;
569 dbg("%s - data bits = 6", __FUNCTION__); 569 dbg("%s - data bits = 6", __func__);
570 break; 570 break;
571 case CS7: 571 case CS7:
572 bits |= BITS_DATA_7; 572 bits |= BITS_DATA_7;
573 dbg("%s - data bits = 7", __FUNCTION__); 573 dbg("%s - data bits = 7", __func__);
574 break; 574 break;
575 case CS8: 575 case CS8:
576 bits |= BITS_DATA_8; 576 bits |= BITS_DATA_8;
577 dbg("%s - data bits = 8", __FUNCTION__); 577 dbg("%s - data bits = 8", __func__);
578 break; 578 break;
579 /*case CS9: 579 /*case CS9:
580 bits |= BITS_DATA_9; 580 bits |= BITS_DATA_9;
581 dbg("%s - data bits = 9", __FUNCTION__); 581 dbg("%s - data bits = 9", __func__);
582 break;*/ 582 break;*/
583 default: 583 default:
584 dev_err(&port->dev, "cp2101 driver does not " 584 dev_err(&port->dev, "cp2101 driver does not "
@@ -598,10 +598,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
598 if (cflag & PARENB) { 598 if (cflag & PARENB) {
599 if (cflag & PARODD) { 599 if (cflag & PARODD) {
600 bits |= BITS_PARITY_ODD; 600 bits |= BITS_PARITY_ODD;
601 dbg("%s - parity = ODD", __FUNCTION__); 601 dbg("%s - parity = ODD", __func__);
602 } else { 602 } else {
603 bits |= BITS_PARITY_EVEN; 603 bits |= BITS_PARITY_EVEN;
604 dbg("%s - parity = EVEN", __FUNCTION__); 604 dbg("%s - parity = EVEN", __func__);
605 } 605 }
606 } 606 }
607 if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) 607 if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
@@ -614,10 +614,10 @@ static void cp2101_set_termios (struct usb_serial_port *port,
614 bits &= ~BITS_STOP_MASK; 614 bits &= ~BITS_STOP_MASK;
615 if (cflag & CSTOPB) { 615 if (cflag & CSTOPB) {
616 bits |= BITS_STOP_2; 616 bits |= BITS_STOP_2;
617 dbg("%s - stop bits = 2", __FUNCTION__); 617 dbg("%s - stop bits = 2", __func__);
618 } else { 618 } else {
619 bits |= BITS_STOP_1; 619 bits |= BITS_STOP_1;
620 dbg("%s - stop bits = 1", __FUNCTION__); 620 dbg("%s - stop bits = 1", __func__);
621 } 621 }
622 if (cp2101_set_config(port, CP2101_BITS, &bits, 2)) 622 if (cp2101_set_config(port, CP2101_BITS, &bits, 2))
623 dev_err(&port->dev, "Number of stop bits requested " 623 dev_err(&port->dev, "Number of stop bits requested "
@@ -627,23 +627,23 @@ static void cp2101_set_termios (struct usb_serial_port *port,
627 if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) { 627 if ((cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
628 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16); 628 cp2101_get_config(port, CP2101_MODEMCTL, modem_ctl, 16);
629 dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x", 629 dbg("%s - read modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
630 __FUNCTION__, modem_ctl[0], modem_ctl[1], 630 __func__, modem_ctl[0], modem_ctl[1],
631 modem_ctl[2], modem_ctl[3]); 631 modem_ctl[2], modem_ctl[3]);
632 632
633 if (cflag & CRTSCTS) { 633 if (cflag & CRTSCTS) {
634 modem_ctl[0] &= ~0x7B; 634 modem_ctl[0] &= ~0x7B;
635 modem_ctl[0] |= 0x09; 635 modem_ctl[0] |= 0x09;
636 modem_ctl[1] = 0x80; 636 modem_ctl[1] = 0x80;
637 dbg("%s - flow control = CRTSCTS", __FUNCTION__); 637 dbg("%s - flow control = CRTSCTS", __func__);
638 } else { 638 } else {
639 modem_ctl[0] &= ~0x7B; 639 modem_ctl[0] &= ~0x7B;
640 modem_ctl[0] |= 0x01; 640 modem_ctl[0] |= 0x01;
641 modem_ctl[1] |= 0x40; 641 modem_ctl[1] |= 0x40;
642 dbg("%s - flow control = NONE", __FUNCTION__); 642 dbg("%s - flow control = NONE", __func__);
643 } 643 }
644 644
645 dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x", 645 dbg("%s - write modem controls = 0x%.4x 0x%.4x 0x%.4x 0x%.4x",
646 __FUNCTION__, modem_ctl[0], modem_ctl[1], 646 __func__, modem_ctl[0], modem_ctl[1],
647 modem_ctl[2], modem_ctl[3]); 647 modem_ctl[2], modem_ctl[3]);
648 cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16); 648 cp2101_set_config(port, CP2101_MODEMCTL, modem_ctl, 16);
649 } 649 }
@@ -655,7 +655,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
655{ 655{
656 int control = 0; 656 int control = 0;
657 657
658 dbg("%s - port %d", __FUNCTION__, port->number); 658 dbg("%s - port %d", __func__, port->number);
659 659
660 if (set & TIOCM_RTS) { 660 if (set & TIOCM_RTS) {
661 control |= CONTROL_RTS; 661 control |= CONTROL_RTS;
@@ -674,7 +674,7 @@ static int cp2101_tiocmset (struct usb_serial_port *port, struct file *file,
674 control |= CONTROL_WRITE_DTR; 674 control |= CONTROL_WRITE_DTR;
675 } 675 }
676 676
677 dbg("%s - control = 0x%.4x", __FUNCTION__, control); 677 dbg("%s - control = 0x%.4x", __func__, control);
678 678
679 return cp2101_set_config(port, CP2101_CONTROL, &control, 2); 679 return cp2101_set_config(port, CP2101_CONTROL, &control, 2);
680 680
@@ -684,7 +684,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
684{ 684{
685 int control, result; 685 int control, result;
686 686
687 dbg("%s - port %d", __FUNCTION__, port->number); 687 dbg("%s - port %d", __func__, port->number);
688 688
689 cp2101_get_config(port, CP2101_CONTROL, &control, 1); 689 cp2101_get_config(port, CP2101_CONTROL, &control, 1);
690 690
@@ -695,7 +695,7 @@ static int cp2101_tiocmget (struct usb_serial_port *port, struct file *file)
695 |((control & CONTROL_RING)? TIOCM_RI : 0) 695 |((control & CONTROL_RING)? TIOCM_RI : 0)
696 |((control & CONTROL_DCD) ? TIOCM_CD : 0); 696 |((control & CONTROL_DCD) ? TIOCM_CD : 0);
697 697
698 dbg("%s - control = 0x%.2x", __FUNCTION__, control); 698 dbg("%s - control = 0x%.2x", __func__, control);
699 699
700 return result; 700 return result;
701} 701}
@@ -704,12 +704,12 @@ static void cp2101_break_ctl (struct usb_serial_port *port, int break_state)
704{ 704{
705 int state; 705 int state;
706 706
707 dbg("%s - port %d", __FUNCTION__, port->number); 707 dbg("%s - port %d", __func__, port->number);
708 if (break_state == 0) 708 if (break_state == 0)
709 state = BREAK_OFF; 709 state = BREAK_OFF;
710 else 710 else
711 state = BREAK_ON; 711 state = BREAK_ON;
712 dbg("%s - turning break %s", __FUNCTION__, 712 dbg("%s - turning break %s", __func__,
713 state==BREAK_OFF ? "off" : "on"); 713 state==BREAK_OFF ? "off" : "on");
714 cp2101_set_config(port, CP2101_BREAK, &state, 2); 714 cp2101_set_config(port, CP2101_BREAK, &state, 2);
715} 715}
@@ -725,7 +725,7 @@ static void cp2101_shutdown (struct usb_serial *serial)
725{ 725{
726 int i; 726 int i;
727 727
728 dbg("%s", __FUNCTION__); 728 dbg("%s", __func__);
729 729
730 /* Stop reads and writes on all ports */ 730 /* Stop reads and writes on all ports */
731 for (i=0; i < serial->num_ports; ++i) { 731 for (i=0; i < serial->num_ports; ++i) {