aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/ircomm/ircomm_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/irda/ircomm/ircomm_core.c')
-rw-r--r--net/irda/ircomm/ircomm_core.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index 6eef1f2a7553..018c92941aba 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -70,7 +70,7 @@ static int __init ircomm_init(void)
70{ 70{
71 ircomm = hashbin_new(HB_LOCK); 71 ircomm = hashbin_new(HB_LOCK);
72 if (ircomm == NULL) { 72 if (ircomm == NULL) {
73 IRDA_ERROR("%s(), can't allocate hashbin!\n", __FUNCTION__); 73 IRDA_ERROR("%s(), can't allocate hashbin!\n", __func__);
74 return -ENOMEM; 74 return -ENOMEM;
75 } 75 }
76 76
@@ -91,7 +91,7 @@ static int __init ircomm_init(void)
91 91
92static void __exit ircomm_cleanup(void) 92static void __exit ircomm_cleanup(void)
93{ 93{
94 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 94 IRDA_DEBUG(2, "%s()\n", __func__ );
95 95
96 hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close); 96 hashbin_delete(ircomm, (FREE_FUNC) __ircomm_close);
97 97
@@ -111,7 +111,7 @@ struct ircomm_cb *ircomm_open(notify_t *notify, __u8 service_type, int line)
111 struct ircomm_cb *self = NULL; 111 struct ircomm_cb *self = NULL;
112 int ret; 112 int ret;
113 113
114 IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __FUNCTION__ , 114 IRDA_DEBUG(2, "%s(), service_type=0x%02x\n", __func__ ,
115 service_type); 115 service_type);
116 116
117 IRDA_ASSERT(ircomm != NULL, return NULL;); 117 IRDA_ASSERT(ircomm != NULL, return NULL;);
@@ -155,7 +155,7 @@ EXPORT_SYMBOL(ircomm_open);
155 */ 155 */
156static int __ircomm_close(struct ircomm_cb *self) 156static int __ircomm_close(struct ircomm_cb *self)
157{ 157{
158 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 158 IRDA_DEBUG(2, "%s()\n", __func__ );
159 159
160 /* Disconnect link if any */ 160 /* Disconnect link if any */
161 ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL); 161 ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
@@ -191,7 +191,7 @@ int ircomm_close(struct ircomm_cb *self)
191 IRDA_ASSERT(self != NULL, return -EIO;); 191 IRDA_ASSERT(self != NULL, return -EIO;);
192 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;); 192 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
193 193
194 IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); 194 IRDA_DEBUG(0, "%s()\n", __func__ );
195 195
196 entry = hashbin_remove(ircomm, self->line, NULL); 196 entry = hashbin_remove(ircomm, self->line, NULL);
197 197
@@ -216,7 +216,7 @@ int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
216 struct ircomm_info info; 216 struct ircomm_info info;
217 int ret; 217 int ret;
218 218
219 IRDA_DEBUG(2 , "%s()\n", __FUNCTION__ ); 219 IRDA_DEBUG(2 , "%s()\n", __func__ );
220 220
221 IRDA_ASSERT(self != NULL, return -1;); 221 IRDA_ASSERT(self != NULL, return -1;);
222 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 222 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -245,7 +245,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
245{ 245{
246 int clen = 0; 246 int clen = 0;
247 247
248 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 248 IRDA_DEBUG(2, "%s()\n", __func__ );
249 249
250 /* Check if the packet contains data on the control channel */ 250 /* Check if the packet contains data on the control channel */
251 if (skb->len > 0) 251 if (skb->len > 0)
@@ -261,7 +261,7 @@ void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
261 info->qos, info->max_data_size, 261 info->qos, info->max_data_size,
262 info->max_header_size, skb); 262 info->max_header_size, skb);
263 else { 263 else {
264 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 264 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
265 } 265 }
266} 266}
267 267
@@ -278,7 +278,7 @@ int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
278 IRDA_ASSERT(self != NULL, return -1;); 278 IRDA_ASSERT(self != NULL, return -1;);
279 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 279 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
280 280
281 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 281 IRDA_DEBUG(4, "%s()\n", __func__ );
282 282
283 ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL); 283 ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
284 284
@@ -296,7 +296,7 @@ EXPORT_SYMBOL(ircomm_connect_response);
296void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, 296void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
297 struct ircomm_info *info) 297 struct ircomm_info *info)
298{ 298{
299 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 299 IRDA_DEBUG(4, "%s()\n", __func__ );
300 300
301 if (self->notify.connect_confirm ) 301 if (self->notify.connect_confirm )
302 self->notify.connect_confirm(self->notify.instance, 302 self->notify.connect_confirm(self->notify.instance,
@@ -304,7 +304,7 @@ void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
304 info->max_data_size, 304 info->max_data_size,
305 info->max_header_size, skb); 305 info->max_header_size, skb);
306 else { 306 else {
307 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 307 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
308 } 308 }
309} 309}
310 310
@@ -318,7 +318,7 @@ int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
318{ 318{
319 int ret; 319 int ret;
320 320
321 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 321 IRDA_DEBUG(4, "%s()\n", __func__ );
322 322
323 IRDA_ASSERT(self != NULL, return -EFAULT;); 323 IRDA_ASSERT(self != NULL, return -EFAULT;);
324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); 324 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -339,14 +339,14 @@ EXPORT_SYMBOL(ircomm_data_request);
339 */ 339 */
340void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) 340void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
341{ 341{
342 IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); 342 IRDA_DEBUG(4, "%s()\n", __func__ );
343 343
344 IRDA_ASSERT(skb->len > 0, return;); 344 IRDA_ASSERT(skb->len > 0, return;);
345 345
346 if (self->notify.data_indication) 346 if (self->notify.data_indication)
347 self->notify.data_indication(self->notify.instance, self, skb); 347 self->notify.data_indication(self->notify.instance, self, skb);
348 else { 348 else {
349 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 349 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
350 } 350 }
351} 351}
352 352
@@ -372,7 +372,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
372 */ 372 */
373 if (unlikely(skb->len < (clen + 1))) { 373 if (unlikely(skb->len < (clen + 1))) {
374 IRDA_DEBUG(2, "%s() throwing away illegal frame\n", 374 IRDA_DEBUG(2, "%s() throwing away illegal frame\n",
375 __FUNCTION__ ); 375 __func__ );
376 return; 376 return;
377 } 377 }
378 378
@@ -391,7 +391,7 @@ void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
391 ircomm_data_indication(self, skb); 391 ircomm_data_indication(self, skb);
392 else { 392 else {
393 IRDA_DEBUG(4, "%s(), data was control info only!\n", 393 IRDA_DEBUG(4, "%s(), data was control info only!\n",
394 __FUNCTION__ ); 394 __func__ );
395 } 395 }
396} 396}
397 397
@@ -405,7 +405,7 @@ int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
405{ 405{
406 int ret; 406 int ret;
407 407
408 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 408 IRDA_DEBUG(2, "%s()\n", __func__ );
409 409
410 IRDA_ASSERT(self != NULL, return -EFAULT;); 410 IRDA_ASSERT(self != NULL, return -EFAULT;);
411 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;); 411 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
@@ -427,7 +427,7 @@ EXPORT_SYMBOL(ircomm_control_request);
427static void ircomm_control_indication(struct ircomm_cb *self, 427static void ircomm_control_indication(struct ircomm_cb *self,
428 struct sk_buff *skb, int clen) 428 struct sk_buff *skb, int clen)
429{ 429{
430 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 430 IRDA_DEBUG(2, "%s()\n", __func__ );
431 431
432 /* Use udata for delivering data on the control channel */ 432 /* Use udata for delivering data on the control channel */
433 if (self->notify.udata_indication) { 433 if (self->notify.udata_indication) {
@@ -448,7 +448,7 @@ static void ircomm_control_indication(struct ircomm_cb *self,
448 * see ircomm_tty_control_indication(). */ 448 * see ircomm_tty_control_indication(). */
449 dev_kfree_skb(ctrl_skb); 449 dev_kfree_skb(ctrl_skb);
450 } else { 450 } else {
451 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 451 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
452 } 452 }
453} 453}
454 454
@@ -463,7 +463,7 @@ int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
463 struct ircomm_info info; 463 struct ircomm_info info;
464 int ret; 464 int ret;
465 465
466 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 466 IRDA_DEBUG(2, "%s()\n", __func__ );
467 467
468 IRDA_ASSERT(self != NULL, return -1;); 468 IRDA_ASSERT(self != NULL, return -1;);
469 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); 469 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
@@ -484,7 +484,7 @@ EXPORT_SYMBOL(ircomm_disconnect_request);
484void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, 484void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
485 struct ircomm_info *info) 485 struct ircomm_info *info)
486{ 486{
487 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 487 IRDA_DEBUG(2, "%s()\n", __func__ );
488 488
489 IRDA_ASSERT(info != NULL, return;); 489 IRDA_ASSERT(info != NULL, return;);
490 490
@@ -492,7 +492,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
492 self->notify.disconnect_indication(self->notify.instance, self, 492 self->notify.disconnect_indication(self->notify.instance, self,
493 info->reason, skb); 493 info->reason, skb);
494 } else { 494 } else {
495 IRDA_DEBUG(0, "%s(), missing handler\n", __FUNCTION__ ); 495 IRDA_DEBUG(0, "%s(), missing handler\n", __func__ );
496 } 496 }
497} 497}
498 498
@@ -504,7 +504,7 @@ void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
504 */ 504 */
505void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) 505void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
506{ 506{
507 IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); 507 IRDA_DEBUG(2, "%s()\n", __func__ );
508 508
509 IRDA_ASSERT(self != NULL, return;); 509 IRDA_ASSERT(self != NULL, return;);
510 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); 510 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);