aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/ircomm/ircomm_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/ircomm/ircomm_tty.c')
-rw-r--r--net/irda/ircomm/ircomm_tty.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index be627e1f04d8..d2620410cb0a 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -115,7 +115,7 @@ static int __init ircomm_tty_init(void)
115 return -ENOMEM; 115 return -ENOMEM;
116 ircomm_tty = hashbin_new(HB_LOCK); 116 ircomm_tty = hashbin_new(HB_LOCK);
117 if (ircomm_tty == NULL) { 117 if (ircomm_tty == NULL) {
118 IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); 118 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
119 put_tty_driver(driver); 119 put_tty_driver(driver);
120 return -ENOMEM; 120 return -ENOMEM;
121 } 121 }
@@ -133,7 +133,7 @@ static int __init ircomm_tty_init(void)
133 tty_set_operations(driver, &ops); 133 tty_set_operations(driver, &ops);
134 if (tty_register_driver(driver)) { 134 if (tty_register_driver(driver)) {
135 IRDA_ERROR("%s(): Couldn't register serial driver\n", 135 IRDA_ERROR("%s(): Couldn't register serial driver\n",
136 __FUNCTION__); 136 __func__);
137 put_tty_driver(driver); 137 put_tty_driver(driver);
138 return -1; 138 return -1;
139 } 139 }
@@ -142,7 +142,7 @@ static int __init ircomm_tty_init(void)
142 142
143static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) 143static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self)
144{ 144{
145 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 145 IRDA_DEBUG(0, "%s()\n", __func__ );
146 146
147 IRDA_ASSERT(self != NULL, return;); 147 IRDA_ASSERT(self != NULL, return;);
148 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 148 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -163,12 +163,12 @@ static void __exit ircomm_tty_cleanup(void)
163{ 163{
164 int ret; 164 int ret;
165 165
166 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 166 IRDA_DEBUG(4, "%s()\n", __func__ );
167 167
168 ret = tty_unregister_driver(driver); 168 ret = tty_unregister_driver(driver);
169 if (ret) { 169 if (ret) {
170 IRDA_ERROR("%s(), failed to unregister driver\n", 170 IRDA_ERROR("%s(), failed to unregister driver\n",
171 __FUNCTION__); 171 __func__);
172 return; 172 return;
173 } 173 }
174 174
@@ -187,14 +187,14 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
187 notify_t notify; 187 notify_t notify;
188 int ret = -ENODEV; 188 int ret = -ENODEV;
189 189
190 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 190 IRDA_DEBUG(2, "%s()\n", __func__ );
191 191
192 IRDA_ASSERT(self != NULL, return -1;); 192 IRDA_ASSERT(self != NULL, return -1;);
193 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 193 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
194 194
195 /* Check if already open */ 195 /* Check if already open */
196 if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) { 196 if (test_and_set_bit(ASYNC_B_INITIALIZED, &self->flags)) {
197 IRDA_DEBUG(2, "%s(), already open so break out!\n", __FUNCTION__ ); 197 IRDA_DEBUG(2, "%s(), already open so break out!\n", __func__ );
198 return 0; 198 return 0;
199 } 199 }
200 200
@@ -224,7 +224,7 @@ static int ircomm_tty_startup(struct ircomm_tty_cb *self)
224 /* Connect IrCOMM link with remote device */ 224 /* Connect IrCOMM link with remote device */
225 ret = ircomm_tty_attach_cable(self); 225 ret = ircomm_tty_attach_cable(self);
226 if (ret < 0) { 226 if (ret < 0) {
227 IRDA_ERROR("%s(), error attaching cable!\n", __FUNCTION__); 227 IRDA_ERROR("%s(), error attaching cable!\n", __func__);
228 goto err; 228 goto err;
229 } 229 }
230 230
@@ -249,7 +249,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
249 unsigned long flags; 249 unsigned long flags;
250 struct tty_struct *tty; 250 struct tty_struct *tty;
251 251
252 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 252 IRDA_DEBUG(2, "%s()\n", __func__ );
253 253
254 tty = self->tty; 254 tty = self->tty;
255 255
@@ -260,12 +260,12 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
260 if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){ 260 if (filp->f_flags & O_NONBLOCK || tty->flags & (1 << TTY_IO_ERROR)){
261 /* nonblock mode is set or port is not enabled */ 261 /* nonblock mode is set or port is not enabled */
262 self->flags |= ASYNC_NORMAL_ACTIVE; 262 self->flags |= ASYNC_NORMAL_ACTIVE;
263 IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __FUNCTION__ ); 263 IRDA_DEBUG(1, "%s(), O_NONBLOCK requested!\n", __func__ );
264 return 0; 264 return 0;
265 } 265 }
266 266
267 if (tty->termios->c_cflag & CLOCAL) { 267 if (tty->termios->c_cflag & CLOCAL) {
268 IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __FUNCTION__ ); 268 IRDA_DEBUG(1, "%s(), doing CLOCAL!\n", __func__ );
269 do_clocal = 1; 269 do_clocal = 1;
270 } 270 }
271 271
@@ -368,7 +368,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
368 unsigned long flags; 368 unsigned long flags;
369 int ret; 369 int ret;
370 370
371 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 371 IRDA_DEBUG(2, "%s()\n", __func__ );
372 372
373 line = tty->index; 373 line = tty->index;
374 if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) { 374 if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
@@ -381,7 +381,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
381 /* No, so make new instance */ 381 /* No, so make new instance */
382 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL); 382 self = kzalloc(sizeof(struct ircomm_tty_cb), GFP_KERNEL);
383 if (self == NULL) { 383 if (self == NULL) {
384 IRDA_ERROR("%s(), kmalloc failed!\n", __FUNCTION__); 384 IRDA_ERROR("%s(), kmalloc failed!\n", __func__);
385 return -ENOMEM; 385 return -ENOMEM;
386 } 386 }
387 387
@@ -420,7 +420,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
420 self->tty = tty; 420 self->tty = tty;
421 spin_unlock_irqrestore(&self->spinlock, flags); 421 spin_unlock_irqrestore(&self->spinlock, flags);
422 422
423 IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name, 423 IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __func__ , tty->driver->name,
424 self->line, self->open_count); 424 self->line, self->open_count);
425 425
426 /* Not really used by us, but lets do it anyway */ 426 /* Not really used by us, but lets do it anyway */
@@ -442,7 +442,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
442 442
443 if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) { 443 if (wait_event_interruptible(self->close_wait, !test_bit(ASYNC_B_CLOSING, &self->flags))) {
444 IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n", 444 IRDA_WARNING("%s - got signal while blocking on ASYNC_CLOSING!\n",
445 __FUNCTION__); 445 __func__);
446 return -ERESTARTSYS; 446 return -ERESTARTSYS;
447 } 447 }
448 448
@@ -460,9 +460,9 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
460 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */ 460 self->settings.service_type = IRCOMM_9_WIRE; /* 9 wire as default */
461 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */ 461 /* Jan Kiszka -> add DSR/RI -> Conform to IrCOMM spec */
462 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */ 462 self->settings.dce = IRCOMM_CTS | IRCOMM_CD | IRCOMM_DSR | IRCOMM_RI; /* Default line settings */
463 IRDA_DEBUG(2, "%s(), IrCOMM device\n", __FUNCTION__ ); 463 IRDA_DEBUG(2, "%s(), IrCOMM device\n", __func__ );
464 } else { 464 } else {
465 IRDA_DEBUG(2, "%s(), IrLPT device\n", __FUNCTION__ ); 465 IRDA_DEBUG(2, "%s(), IrLPT device\n", __func__ );
466 self->service_type = IRCOMM_3_WIRE_RAW; 466 self->service_type = IRCOMM_3_WIRE_RAW;
467 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */ 467 self->settings.service_type = IRCOMM_3_WIRE_RAW; /* Default */
468 } 468 }
@@ -474,7 +474,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
474 ret = ircomm_tty_block_til_ready(self, filp); 474 ret = ircomm_tty_block_til_ready(self, filp);
475 if (ret) { 475 if (ret) {
476 IRDA_DEBUG(2, 476 IRDA_DEBUG(2,
477 "%s(), returning after block_til_ready with %d\n", __FUNCTION__ , 477 "%s(), returning after block_til_ready with %d\n", __func__ ,
478 ret); 478 ret);
479 479
480 return ret; 480 return ret;
@@ -493,7 +493,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
493 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 493 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
494 unsigned long flags; 494 unsigned long flags;
495 495
496 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 496 IRDA_DEBUG(0, "%s()\n", __func__ );
497 497
498 if (!tty) 498 if (!tty)
499 return; 499 return;
@@ -506,7 +506,7 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
506 if (tty_hung_up_p(filp)) { 506 if (tty_hung_up_p(filp)) {
507 spin_unlock_irqrestore(&self->spinlock, flags); 507 spin_unlock_irqrestore(&self->spinlock, flags);
508 508
509 IRDA_DEBUG(0, "%s(), returning 1\n", __FUNCTION__ ); 509 IRDA_DEBUG(0, "%s(), returning 1\n", __func__ );
510 return; 510 return;
511 } 511 }
512 512
@@ -519,20 +519,20 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
519 * serial port won't be shutdown. 519 * serial port won't be shutdown.
520 */ 520 */
521 IRDA_DEBUG(0, "%s(), bad serial port count; " 521 IRDA_DEBUG(0, "%s(), bad serial port count; "
522 "tty->count is 1, state->count is %d\n", __FUNCTION__ , 522 "tty->count is 1, state->count is %d\n", __func__ ,
523 self->open_count); 523 self->open_count);
524 self->open_count = 1; 524 self->open_count = 1;
525 } 525 }
526 526
527 if (--self->open_count < 0) { 527 if (--self->open_count < 0) {
528 IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n", 528 IRDA_ERROR("%s(), bad serial port count for ttys%d: %d\n",
529 __FUNCTION__, self->line, self->open_count); 529 __func__, self->line, self->open_count);
530 self->open_count = 0; 530 self->open_count = 0;
531 } 531 }
532 if (self->open_count) { 532 if (self->open_count) {
533 spin_unlock_irqrestore(&self->spinlock, flags); 533 spin_unlock_irqrestore(&self->spinlock, flags);
534 534
535 IRDA_DEBUG(0, "%s(), open count > 0\n", __FUNCTION__ ); 535 IRDA_DEBUG(0, "%s(), open count > 0\n", __func__ );
536 return; 536 return;
537 } 537 }
538 538
@@ -608,7 +608,7 @@ static void ircomm_tty_do_softint(struct work_struct *work)
608 unsigned long flags; 608 unsigned long flags;
609 struct sk_buff *skb, *ctrl_skb; 609 struct sk_buff *skb, *ctrl_skb;
610 610
611 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 611 IRDA_DEBUG(2, "%s()\n", __func__ );
612 612
613 if (!self || self->magic != IRCOMM_TTY_MAGIC) 613 if (!self || self->magic != IRCOMM_TTY_MAGIC)
614 return; 614 return;
@@ -678,7 +678,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
678 int len = 0; 678 int len = 0;
679 int size; 679 int size;
680 680
681 IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __FUNCTION__ , count, 681 IRDA_DEBUG(2, "%s(), count=%d, hw_stopped=%d\n", __func__ , count,
682 tty->hw_stopped); 682 tty->hw_stopped);
683 683
684 IRDA_ASSERT(self != NULL, return -1;); 684 IRDA_ASSERT(self != NULL, return -1;);
@@ -701,7 +701,7 @@ static int ircomm_tty_write(struct tty_struct *tty,
701 * we don't mess up the original "safe skb" (see tx_data_size). 701 * we don't mess up the original "safe skb" (see tx_data_size).
702 * Jean II */ 702 * Jean II */
703 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) { 703 if (self->max_header_size == IRCOMM_TTY_HDR_UNINITIALISED) {
704 IRDA_DEBUG(1, "%s() : not initialised\n", __FUNCTION__); 704 IRDA_DEBUG(1, "%s() : not initialised\n", __func__);
705#ifdef IRCOMM_NO_TX_BEFORE_INIT 705#ifdef IRCOMM_NO_TX_BEFORE_INIT
706 /* We didn't consume anything, TTY will retry */ 706 /* We didn't consume anything, TTY will retry */
707 return 0; 707 return 0;
@@ -830,7 +830,7 @@ static int ircomm_tty_write_room(struct tty_struct *tty)
830 ret = self->max_data_size; 830 ret = self->max_data_size;
831 spin_unlock_irqrestore(&self->spinlock, flags); 831 spin_unlock_irqrestore(&self->spinlock, flags);
832 } 832 }
833 IRDA_DEBUG(2, "%s(), ret=%d\n", __FUNCTION__ , ret); 833 IRDA_DEBUG(2, "%s(), ret=%d\n", __func__ , ret);
834 834
835 return ret; 835 return ret;
836} 836}
@@ -847,7 +847,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
847 unsigned long orig_jiffies, poll_time; 847 unsigned long orig_jiffies, poll_time;
848 unsigned long flags; 848 unsigned long flags;
849 849
850 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 850 IRDA_DEBUG(2, "%s()\n", __func__ );
851 851
852 IRDA_ASSERT(self != NULL, return;); 852 IRDA_ASSERT(self != NULL, return;);
853 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 853 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -882,7 +882,7 @@ static void ircomm_tty_throttle(struct tty_struct *tty)
882{ 882{
883 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 883 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
884 884
885 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 885 IRDA_DEBUG(2, "%s()\n", __func__ );
886 886
887 IRDA_ASSERT(self != NULL, return;); 887 IRDA_ASSERT(self != NULL, return;);
888 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 888 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -913,7 +913,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
913{ 913{
914 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 914 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
915 915
916 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 916 IRDA_DEBUG(2, "%s()\n", __func__ );
917 917
918 IRDA_ASSERT(self != NULL, return;); 918 IRDA_ASSERT(self != NULL, return;);
919 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 919 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -928,7 +928,7 @@ static void ircomm_tty_unthrottle(struct tty_struct *tty)
928 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS); 928 self->settings.dte |= (IRCOMM_RTS|IRCOMM_DELTA_RTS);
929 929
930 ircomm_param_request(self, IRCOMM_DTE, TRUE); 930 ircomm_param_request(self, IRCOMM_DTE, TRUE);
931 IRDA_DEBUG(1, "%s(), FLOW_START\n", __FUNCTION__ ); 931 IRDA_DEBUG(1, "%s(), FLOW_START\n", __func__ );
932 } 932 }
933 ircomm_flow_request(self->ircomm, FLOW_START); 933 ircomm_flow_request(self->ircomm, FLOW_START);
934} 934}
@@ -965,7 +965,7 @@ static void ircomm_tty_shutdown(struct ircomm_tty_cb *self)
965 IRDA_ASSERT(self != NULL, return;); 965 IRDA_ASSERT(self != NULL, return;);
966 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 966 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
967 967
968 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 968 IRDA_DEBUG(0, "%s()\n", __func__ );
969 969
970 if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags)) 970 if (!test_and_clear_bit(ASYNC_B_INITIALIZED, &self->flags))
971 return; 971 return;
@@ -1008,7 +1008,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
1008 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; 1008 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data;
1009 unsigned long flags; 1009 unsigned long flags;
1010 1010
1011 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1011 IRDA_DEBUG(0, "%s()\n", __func__ );
1012 1012
1013 IRDA_ASSERT(self != NULL, return;); 1013 IRDA_ASSERT(self != NULL, return;);
1014 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 1014 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1037,7 +1037,7 @@ static void ircomm_tty_hangup(struct tty_struct *tty)
1037 */ 1037 */
1038static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) 1038static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch)
1039{ 1039{
1040 IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__ ); 1040 IRDA_DEBUG(0, "%s(), not impl\n", __func__ );
1041} 1041}
1042 1042
1043/* 1043/*
@@ -1081,7 +1081,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1081 struct tty_struct *tty; 1081 struct tty_struct *tty;
1082 int status; 1082 int status;
1083 1083
1084 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 1084 IRDA_DEBUG(0, "%s()\n", __func__ );
1085 1085
1086 IRDA_ASSERT(self != NULL, return;); 1086 IRDA_ASSERT(self != NULL, return;);
1087 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); 1087 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;);
@@ -1095,14 +1095,14 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1095 } 1095 }
1096 if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) { 1096 if ((self->flags & ASYNC_CHECK_CD) && (status & IRCOMM_DELTA_CD)) {
1097 IRDA_DEBUG(2, 1097 IRDA_DEBUG(2,
1098 "%s(), ircomm%d CD now %s...\n", __FUNCTION__ , self->line, 1098 "%s(), ircomm%d CD now %s...\n", __func__ , self->line,
1099 (status & IRCOMM_CD) ? "on" : "off"); 1099 (status & IRCOMM_CD) ? "on" : "off");
1100 1100
1101 if (status & IRCOMM_CD) { 1101 if (status & IRCOMM_CD) {
1102 wake_up_interruptible(&self->open_wait); 1102 wake_up_interruptible(&self->open_wait);
1103 } else { 1103 } else {
1104 IRDA_DEBUG(2, 1104 IRDA_DEBUG(2,
1105 "%s(), Doing serial hangup..\n", __FUNCTION__ ); 1105 "%s(), Doing serial hangup..\n", __func__ );
1106 if (tty) 1106 if (tty)
1107 tty_hangup(tty); 1107 tty_hangup(tty);
1108 1108
@@ -1114,7 +1114,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1114 if (tty->hw_stopped) { 1114 if (tty->hw_stopped) {
1115 if (status & IRCOMM_CTS) { 1115 if (status & IRCOMM_CTS) {
1116 IRDA_DEBUG(2, 1116 IRDA_DEBUG(2,
1117 "%s(), CTS tx start...\n", __FUNCTION__ ); 1117 "%s(), CTS tx start...\n", __func__ );
1118 tty->hw_stopped = 0; 1118 tty->hw_stopped = 0;
1119 1119
1120 /* Wake up processes blocked on open */ 1120 /* Wake up processes blocked on open */
@@ -1126,7 +1126,7 @@ void ircomm_tty_check_modem_status(struct ircomm_tty_cb *self)
1126 } else { 1126 } else {
1127 if (!(status & IRCOMM_CTS)) { 1127 if (!(status & IRCOMM_CTS)) {
1128 IRDA_DEBUG(2, 1128 IRDA_DEBUG(2,
1129 "%s(), CTS tx stop...\n", __FUNCTION__ ); 1129 "%s(), CTS tx stop...\n", __func__ );
1130 tty->hw_stopped = 1; 1130 tty->hw_stopped = 1;
1131 } 1131 }
1132 } 1132 }
@@ -1144,14 +1144,14 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1144{ 1144{
1145 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1145 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1146 1146
1147 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 1147 IRDA_DEBUG(2, "%s()\n", __func__ );
1148 1148
1149 IRDA_ASSERT(self != NULL, return -1;); 1149 IRDA_ASSERT(self != NULL, return -1;);
1150 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1150 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
1151 IRDA_ASSERT(skb != NULL, return -1;); 1151 IRDA_ASSERT(skb != NULL, return -1;);
1152 1152
1153 if (!self->tty) { 1153 if (!self->tty) {
1154 IRDA_DEBUG(0, "%s(), no tty!\n", __FUNCTION__ ); 1154 IRDA_DEBUG(0, "%s(), no tty!\n", __func__ );
1155 return 0; 1155 return 0;
1156 } 1156 }
1157 1157
@@ -1162,7 +1162,7 @@ static int ircomm_tty_data_indication(void *instance, void *sap,
1162 * params, we can just as well declare the hardware for running. 1162 * params, we can just as well declare the hardware for running.
1163 */ 1163 */
1164 if (self->tty->hw_stopped && (self->flow == FLOW_START)) { 1164 if (self->tty->hw_stopped && (self->flow == FLOW_START)) {
1165 IRDA_DEBUG(0, "%s(), polling for line settings!\n", __FUNCTION__ ); 1165 IRDA_DEBUG(0, "%s(), polling for line settings!\n", __func__ );
1166 ircomm_param_request(self, IRCOMM_POLL, TRUE); 1166 ircomm_param_request(self, IRCOMM_POLL, TRUE);
1167 1167
1168 /* We can just as well declare the hardware for running */ 1168 /* We can just as well declare the hardware for running */
@@ -1194,7 +1194,7 @@ static int ircomm_tty_control_indication(void *instance, void *sap,
1194 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; 1194 struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance;
1195 int clen; 1195 int clen;
1196 1196
1197 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 1197 IRDA_DEBUG(4, "%s()\n", __func__ );
1198 1198
1199 IRDA_ASSERT(self != NULL, return -1;); 1199 IRDA_ASSERT(self != NULL, return -1;);
1200 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 1200 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
@@ -1230,7 +1230,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1230 1230
1231 switch (cmd) { 1231 switch (cmd) {
1232 case FLOW_START: 1232 case FLOW_START:
1233 IRDA_DEBUG(2, "%s(), hw start!\n", __FUNCTION__ ); 1233 IRDA_DEBUG(2, "%s(), hw start!\n", __func__ );
1234 tty->hw_stopped = 0; 1234 tty->hw_stopped = 0;
1235 1235
1236 /* ircomm_tty_do_softint will take care of the rest */ 1236 /* ircomm_tty_do_softint will take care of the rest */
@@ -1238,7 +1238,7 @@ static void ircomm_tty_flow_indication(void *instance, void *sap,
1238 break; 1238 break;
1239 default: /* If we get here, something is very wrong, better stop */ 1239 default: /* If we get here, something is very wrong, better stop */
1240 case FLOW_STOP: 1240 case FLOW_STOP:
1241 IRDA_DEBUG(2, "%s(), hw stopped!\n", __FUNCTION__ ); 1241 IRDA_DEBUG(2, "%s(), hw stopped!\n", __func__ );
1242 tty->hw_stopped = 1; 1242 tty->hw_stopped = 1;
1243 break; 1243 break;
1244 } 1244 }