diff options
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r-- | net/irda/ircomm/ircomm_core.c | 46 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_event.c | 12 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_lmp.c | 30 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_param.c | 32 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_ttp.c | 26 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty.c | 90 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty_attach.c | 78 | ||||
-rw-r--r-- | net/irda/ircomm/ircomm_tty_ioctl.c | 18 |
8 files changed, 166 insertions, 166 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 | ||
92 | static void __exit ircomm_cleanup(void) | 92 | static 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 | */ |
156 | static int __ircomm_close(struct ircomm_cb *self) | 156 | static 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); | |||
296 | void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb, | 296 | void 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 | */ |
340 | void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb) | 340 | void 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); | |||
427 | static void ircomm_control_indication(struct ircomm_cb *self, | 427 | static 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); | |||
484 | void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb, | 484 | void 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 | */ |
505 | void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow) | 505 | void 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;); |
diff --git a/net/irda/ircomm/ircomm_event.c b/net/irda/ircomm/ircomm_event.c index 8ba4e59ece16..c35b3ef5c2f0 100644 --- a/net/irda/ircomm/ircomm_event.c +++ b/net/irda/ircomm/ircomm_event.c | |||
@@ -108,7 +108,7 @@ static int ircomm_state_idle(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
108 | ircomm_connect_indication(self, skb, info); | 108 | ircomm_connect_indication(self, skb, info); |
109 | break; | 109 | break; |
110 | default: | 110 | default: |
111 | IRDA_DEBUG(4, "%s(), unknown event: %s\n", __FUNCTION__ , | 111 | IRDA_DEBUG(4, "%s(), unknown event: %s\n", __func__ , |
112 | ircomm_event[event]); | 112 | ircomm_event[event]); |
113 | ret = -EINVAL; | 113 | ret = -EINVAL; |
114 | } | 114 | } |
@@ -138,7 +138,7 @@ static int ircomm_state_waiti(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
138 | ircomm_disconnect_indication(self, skb, info); | 138 | ircomm_disconnect_indication(self, skb, info); |
139 | break; | 139 | break; |
140 | default: | 140 | default: |
141 | IRDA_DEBUG(0, "%s(), unknown event: %s\n", __FUNCTION__ , | 141 | IRDA_DEBUG(0, "%s(), unknown event: %s\n", __func__ , |
142 | ircomm_event[event]); | 142 | ircomm_event[event]); |
143 | ret = -EINVAL; | 143 | ret = -EINVAL; |
144 | } | 144 | } |
@@ -171,7 +171,7 @@ static int ircomm_state_waitr(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
171 | ircomm_disconnect_indication(self, skb, info); | 171 | ircomm_disconnect_indication(self, skb, info); |
172 | break; | 172 | break; |
173 | default: | 173 | default: |
174 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , | 174 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , |
175 | ircomm_event[event]); | 175 | ircomm_event[event]); |
176 | ret = -EINVAL; | 176 | ret = -EINVAL; |
177 | } | 177 | } |
@@ -213,7 +213,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
213 | ret = self->issue.disconnect_request(self, skb, info); | 213 | ret = self->issue.disconnect_request(self, skb, info); |
214 | break; | 214 | break; |
215 | default: | 215 | default: |
216 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __FUNCTION__ , | 216 | IRDA_DEBUG(0, "%s(), unknown event = %s\n", __func__ , |
217 | ircomm_event[event]); | 217 | ircomm_event[event]); |
218 | ret = -EINVAL; | 218 | ret = -EINVAL; |
219 | } | 219 | } |
@@ -229,7 +229,7 @@ static int ircomm_state_conn(struct ircomm_cb *self, IRCOMM_EVENT event, | |||
229 | int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, | 229 | int ircomm_do_event(struct ircomm_cb *self, IRCOMM_EVENT event, |
230 | struct sk_buff *skb, struct ircomm_info *info) | 230 | struct sk_buff *skb, struct ircomm_info *info) |
231 | { | 231 | { |
232 | IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __FUNCTION__ , | 232 | IRDA_DEBUG(4, "%s: state=%s, event=%s\n", __func__ , |
233 | ircomm_state[self->state], ircomm_event[event]); | 233 | ircomm_state[self->state], ircomm_event[event]); |
234 | 234 | ||
235 | return (*state[self->state])(self, event, skb, info); | 235 | return (*state[self->state])(self, event, skb, info); |
@@ -245,6 +245,6 @@ void ircomm_next_state(struct ircomm_cb *self, IRCOMM_STATE state) | |||
245 | { | 245 | { |
246 | self->state = state; | 246 | self->state = state; |
247 | 247 | ||
248 | IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __FUNCTION__ , | 248 | IRDA_DEBUG(4, "%s: next state=%s, service type=%d\n", __func__ , |
249 | ircomm_state[self->state], self->service_type); | 249 | ircomm_state[self->state], self->service_type); |
250 | } | 250 | } |
diff --git a/net/irda/ircomm/ircomm_lmp.c b/net/irda/ircomm/ircomm_lmp.c index 55860ee4e39e..67c99d20857f 100644 --- a/net/irda/ircomm/ircomm_lmp.c +++ b/net/irda/ircomm/ircomm_lmp.c | |||
@@ -53,7 +53,7 @@ static int ircomm_lmp_connect_request(struct ircomm_cb *self, | |||
53 | { | 53 | { |
54 | int ret = 0; | 54 | int ret = 0; |
55 | 55 | ||
56 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 56 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
57 | 57 | ||
58 | /* Don't forget to refcount it - should be NULL anyway */ | 58 | /* Don't forget to refcount it - should be NULL anyway */ |
59 | if(userdata) | 59 | if(userdata) |
@@ -76,7 +76,7 @@ static int ircomm_lmp_connect_response(struct ircomm_cb *self, | |||
76 | struct sk_buff *tx_skb; | 76 | struct sk_buff *tx_skb; |
77 | int ret; | 77 | int ret; |
78 | 78 | ||
79 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 79 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
80 | 80 | ||
81 | /* Any userdata supplied? */ | 81 | /* Any userdata supplied? */ |
82 | if (userdata == NULL) { | 82 | if (userdata == NULL) { |
@@ -111,7 +111,7 @@ static int ircomm_lmp_disconnect_request(struct ircomm_cb *self, | |||
111 | struct sk_buff *tx_skb; | 111 | struct sk_buff *tx_skb; |
112 | int ret; | 112 | int ret; |
113 | 113 | ||
114 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 114 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
115 | 115 | ||
116 | if (!userdata) { | 116 | if (!userdata) { |
117 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); | 117 | tx_skb = alloc_skb(LMP_MAX_HEADER, GFP_ATOMIC); |
@@ -148,13 +148,13 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) | |||
148 | 148 | ||
149 | cb = (struct irda_skb_cb *) skb->cb; | 149 | cb = (struct irda_skb_cb *) skb->cb; |
150 | 150 | ||
151 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 151 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
152 | 152 | ||
153 | line = cb->line; | 153 | line = cb->line; |
154 | 154 | ||
155 | self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); | 155 | self = (struct ircomm_cb *) hashbin_lock_find(ircomm, line, NULL); |
156 | if (!self) { | 156 | if (!self) { |
157 | IRDA_DEBUG(2, "%s(), didn't find myself\n", __FUNCTION__ ); | 157 | IRDA_DEBUG(2, "%s(), didn't find myself\n", __func__ ); |
158 | return; | 158 | return; |
159 | } | 159 | } |
160 | 160 | ||
@@ -164,7 +164,7 @@ static void ircomm_lmp_flow_control(struct sk_buff *skb) | |||
164 | self->pkt_count--; | 164 | self->pkt_count--; |
165 | 165 | ||
166 | if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { | 166 | if ((self->pkt_count < 2) && (self->flow_status == FLOW_STOP)) { |
167 | IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __FUNCTION__ ); | 167 | IRDA_DEBUG(2, "%s(), asking TTY to start again!\n", __func__ ); |
168 | self->flow_status = FLOW_START; | 168 | self->flow_status = FLOW_START; |
169 | if (self->notify.flow_indication) | 169 | if (self->notify.flow_indication) |
170 | self->notify.flow_indication(self->notify.instance, | 170 | self->notify.flow_indication(self->notify.instance, |
@@ -191,7 +191,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
191 | 191 | ||
192 | cb->line = self->line; | 192 | cb->line = self->line; |
193 | 193 | ||
194 | IRDA_DEBUG(4, "%s(), sending frame\n", __FUNCTION__ ); | 194 | IRDA_DEBUG(4, "%s(), sending frame\n", __func__ ); |
195 | 195 | ||
196 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ | 196 | /* Don't forget to refcount it - see ircomm_tty_do_softint() */ |
197 | skb_get(skb); | 197 | skb_get(skb); |
@@ -199,7 +199,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
199 | skb->destructor = ircomm_lmp_flow_control; | 199 | skb->destructor = ircomm_lmp_flow_control; |
200 | 200 | ||
201 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { | 201 | if ((self->pkt_count++ > 7) && (self->flow_status == FLOW_START)) { |
202 | IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __FUNCTION__ ); | 202 | IRDA_DEBUG(2, "%s(), asking TTY to slow down!\n", __func__ ); |
203 | self->flow_status = FLOW_STOP; | 203 | self->flow_status = FLOW_STOP; |
204 | if (self->notify.flow_indication) | 204 | if (self->notify.flow_indication) |
205 | self->notify.flow_indication(self->notify.instance, | 205 | self->notify.flow_indication(self->notify.instance, |
@@ -207,7 +207,7 @@ static int ircomm_lmp_data_request(struct ircomm_cb *self, | |||
207 | } | 207 | } |
208 | ret = irlmp_data_request(self->lsap, skb); | 208 | ret = irlmp_data_request(self->lsap, skb); |
209 | if (ret) { | 209 | if (ret) { |
210 | IRDA_ERROR("%s(), failed\n", __FUNCTION__); | 210 | IRDA_ERROR("%s(), failed\n", __func__); |
211 | /* irlmp_data_request already free the packet */ | 211 | /* irlmp_data_request already free the packet */ |
212 | } | 212 | } |
213 | 213 | ||
@@ -225,7 +225,7 @@ static int ircomm_lmp_data_indication(void *instance, void *sap, | |||
225 | { | 225 | { |
226 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 226 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
227 | 227 | ||
228 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 228 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
229 | 229 | ||
230 | IRDA_ASSERT(self != NULL, return -1;); | 230 | IRDA_ASSERT(self != NULL, return -1;); |
231 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 231 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
@@ -255,7 +255,7 @@ static void ircomm_lmp_connect_confirm(void *instance, void *sap, | |||
255 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 255 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
256 | struct ircomm_info info; | 256 | struct ircomm_info info; |
257 | 257 | ||
258 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 258 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
259 | 259 | ||
260 | IRDA_ASSERT(self != NULL, return;); | 260 | IRDA_ASSERT(self != NULL, return;); |
261 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 261 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -288,7 +288,7 @@ static void ircomm_lmp_connect_indication(void *instance, void *sap, | |||
288 | struct ircomm_cb *self = (struct ircomm_cb *)instance; | 288 | struct ircomm_cb *self = (struct ircomm_cb *)instance; |
289 | struct ircomm_info info; | 289 | struct ircomm_info info; |
290 | 290 | ||
291 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 291 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
292 | 292 | ||
293 | IRDA_ASSERT(self != NULL, return;); | 293 | IRDA_ASSERT(self != NULL, return;); |
294 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 294 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -318,7 +318,7 @@ static void ircomm_lmp_disconnect_indication(void *instance, void *sap, | |||
318 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 318 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
319 | struct ircomm_info info; | 319 | struct ircomm_info info; |
320 | 320 | ||
321 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 321 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
322 | 322 | ||
323 | IRDA_ASSERT(self != NULL, return;); | 323 | IRDA_ASSERT(self != NULL, return;); |
324 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 324 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -341,7 +341,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) | |||
341 | { | 341 | { |
342 | notify_t notify; | 342 | notify_t notify; |
343 | 343 | ||
344 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 344 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
345 | 345 | ||
346 | /* Register callbacks */ | 346 | /* Register callbacks */ |
347 | irda_notify_init(¬ify); | 347 | irda_notify_init(¬ify); |
@@ -354,7 +354,7 @@ int ircomm_open_lsap(struct ircomm_cb *self) | |||
354 | 354 | ||
355 | self->lsap = irlmp_open_lsap(LSAP_ANY, ¬ify, 0); | 355 | self->lsap = irlmp_open_lsap(LSAP_ANY, ¬ify, 0); |
356 | if (!self->lsap) { | 356 | if (!self->lsap) { |
357 | IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __FUNCTION__ ); | 357 | IRDA_DEBUG(0,"%sfailed to allocate tsap\n", __func__ ); |
358 | return -1; | 358 | return -1; |
359 | } | 359 | } |
360 | self->slsap_sel = self->lsap->slsap_sel; | 360 | self->slsap_sel = self->lsap->slsap_sel; |
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c index 598dcbe4a501..d57aefd9fe77 100644 --- a/net/irda/ircomm/ircomm_param.c +++ b/net/irda/ircomm/ircomm_param.c | |||
@@ -103,7 +103,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) | |||
103 | struct sk_buff *skb; | 103 | struct sk_buff *skb; |
104 | int count; | 104 | int count; |
105 | 105 | ||
106 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 106 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
107 | 107 | ||
108 | IRDA_ASSERT(self != NULL, return -1;); | 108 | IRDA_ASSERT(self != NULL, return -1;); |
109 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 109 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
@@ -136,7 +136,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) | |||
136 | count = irda_param_insert(self, pi, skb_tail_pointer(skb), | 136 | count = irda_param_insert(self, pi, skb_tail_pointer(skb), |
137 | skb_tailroom(skb), &ircomm_param_info); | 137 | skb_tailroom(skb), &ircomm_param_info); |
138 | if (count < 0) { | 138 | if (count < 0) { |
139 | IRDA_WARNING("%s(), no room for parameter!\n", __FUNCTION__); | 139 | IRDA_WARNING("%s(), no room for parameter!\n", __func__); |
140 | spin_unlock_irqrestore(&self->spinlock, flags); | 140 | spin_unlock_irqrestore(&self->spinlock, flags); |
141 | return -1; | 141 | return -1; |
142 | } | 142 | } |
@@ -144,7 +144,7 @@ int ircomm_param_request(struct ircomm_tty_cb *self, __u8 pi, int flush) | |||
144 | 144 | ||
145 | spin_unlock_irqrestore(&self->spinlock, flags); | 145 | spin_unlock_irqrestore(&self->spinlock, flags); |
146 | 146 | ||
147 | IRDA_DEBUG(2, "%s(), skb->len=%d\n", __FUNCTION__ , skb->len); | 147 | IRDA_DEBUG(2, "%s(), skb->len=%d\n", __func__ , skb->len); |
148 | 148 | ||
149 | if (flush) { | 149 | if (flush) { |
150 | /* ircomm_tty_do_softint will take care of the rest */ | 150 | /* ircomm_tty_do_softint will take care of the rest */ |
@@ -179,10 +179,10 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, | |||
179 | service_type &= self->service_type; | 179 | service_type &= self->service_type; |
180 | if (!service_type) { | 180 | if (!service_type) { |
181 | IRDA_DEBUG(2, | 181 | IRDA_DEBUG(2, |
182 | "%s(), No common service type to use!\n", __FUNCTION__ ); | 182 | "%s(), No common service type to use!\n", __func__ ); |
183 | return -1; | 183 | return -1; |
184 | } | 184 | } |
185 | IRDA_DEBUG(0, "%s(), services in common=%02x\n", __FUNCTION__ , | 185 | IRDA_DEBUG(0, "%s(), services in common=%02x\n", __func__ , |
186 | service_type); | 186 | service_type); |
187 | 187 | ||
188 | /* | 188 | /* |
@@ -197,7 +197,7 @@ static int ircomm_param_service_type(void *instance, irda_param_t *param, | |||
197 | else if (service_type & IRCOMM_3_WIRE_RAW) | 197 | else if (service_type & IRCOMM_3_WIRE_RAW) |
198 | self->settings.service_type = IRCOMM_3_WIRE_RAW; | 198 | self->settings.service_type = IRCOMM_3_WIRE_RAW; |
199 | 199 | ||
200 | IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __FUNCTION__ , | 200 | IRDA_DEBUG(0, "%s(), resulting service type=0x%02x\n", __func__ , |
201 | self->settings.service_type); | 201 | self->settings.service_type); |
202 | 202 | ||
203 | /* | 203 | /* |
@@ -240,7 +240,7 @@ static int ircomm_param_port_type(void *instance, irda_param_t *param, int get) | |||
240 | else { | 240 | else { |
241 | self->settings.port_type = (__u8) param->pv.i; | 241 | self->settings.port_type = (__u8) param->pv.i; |
242 | 242 | ||
243 | IRDA_DEBUG(0, "%s(), port type=%d\n", __FUNCTION__ , | 243 | IRDA_DEBUG(0, "%s(), port type=%d\n", __func__ , |
244 | self->settings.port_type); | 244 | self->settings.port_type); |
245 | } | 245 | } |
246 | return 0; | 246 | return 0; |
@@ -260,9 +260,9 @@ static int ircomm_param_port_name(void *instance, irda_param_t *param, int get) | |||
260 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 260 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
261 | 261 | ||
262 | if (get) { | 262 | if (get) { |
263 | IRDA_DEBUG(0, "%s(), not imp!\n", __FUNCTION__ ); | 263 | IRDA_DEBUG(0, "%s(), not imp!\n", __func__ ); |
264 | } else { | 264 | } else { |
265 | IRDA_DEBUG(0, "%s(), port-name=%s\n", __FUNCTION__ , param->pv.c); | 265 | IRDA_DEBUG(0, "%s(), port-name=%s\n", __func__ , param->pv.c); |
266 | strncpy(self->settings.port_name, param->pv.c, 32); | 266 | strncpy(self->settings.port_name, param->pv.c, 32); |
267 | } | 267 | } |
268 | 268 | ||
@@ -287,7 +287,7 @@ static int ircomm_param_data_rate(void *instance, irda_param_t *param, int get) | |||
287 | else | 287 | else |
288 | self->settings.data_rate = param->pv.i; | 288 | self->settings.data_rate = param->pv.i; |
289 | 289 | ||
290 | IRDA_DEBUG(2, "%s(), data rate = %d\n", __FUNCTION__ , param->pv.i); | 290 | IRDA_DEBUG(2, "%s(), data rate = %d\n", __func__ , param->pv.i); |
291 | 291 | ||
292 | return 0; | 292 | return 0; |
293 | } | 293 | } |
@@ -333,7 +333,7 @@ static int ircomm_param_flow_control(void *instance, irda_param_t *param, | |||
333 | else | 333 | else |
334 | self->settings.flow_control = (__u8) param->pv.i; | 334 | self->settings.flow_control = (__u8) param->pv.i; |
335 | 335 | ||
336 | IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); | 336 | IRDA_DEBUG(1, "%s(), flow control = 0x%02x\n", __func__ , (__u8) param->pv.i); |
337 | 337 | ||
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
@@ -359,7 +359,7 @@ static int ircomm_param_xon_xoff(void *instance, irda_param_t *param, int get) | |||
359 | self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; | 359 | self->settings.xonxoff[1] = (__u16) param->pv.i >> 8; |
360 | } | 360 | } |
361 | 361 | ||
362 | IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __FUNCTION__ , | 362 | IRDA_DEBUG(0, "%s(), XON/XOFF = 0x%02x,0x%02x\n", __func__ , |
363 | param->pv.i & 0xff, param->pv.i >> 8); | 363 | param->pv.i & 0xff, param->pv.i >> 8); |
364 | 364 | ||
365 | return 0; | 365 | return 0; |
@@ -386,7 +386,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) | |||
386 | self->settings.enqack[1] = (__u16) param->pv.i >> 8; | 386 | self->settings.enqack[1] = (__u16) param->pv.i >> 8; |
387 | } | 387 | } |
388 | 388 | ||
389 | IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __FUNCTION__ , | 389 | IRDA_DEBUG(0, "%s(), ENQ/ACK = 0x%02x,0x%02x\n", __func__ , |
390 | param->pv.i & 0xff, param->pv.i >> 8); | 390 | param->pv.i & 0xff, param->pv.i >> 8); |
391 | 391 | ||
392 | return 0; | 392 | return 0; |
@@ -401,7 +401,7 @@ static int ircomm_param_enq_ack(void *instance, irda_param_t *param, int get) | |||
401 | static int ircomm_param_line_status(void *instance, irda_param_t *param, | 401 | static int ircomm_param_line_status(void *instance, irda_param_t *param, |
402 | int get) | 402 | int get) |
403 | { | 403 | { |
404 | IRDA_DEBUG(2, "%s(), not impl.\n", __FUNCTION__ ); | 404 | IRDA_DEBUG(2, "%s(), not impl.\n", __func__ ); |
405 | 405 | ||
406 | return 0; | 406 | return 0; |
407 | } | 407 | } |
@@ -462,7 +462,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) | |||
462 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 462 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
463 | __u8 dce; | 463 | __u8 dce; |
464 | 464 | ||
465 | IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __FUNCTION__ , (__u8) param->pv.i); | 465 | IRDA_DEBUG(1, "%s(), dce = 0x%02x\n", __func__ , (__u8) param->pv.i); |
466 | 466 | ||
467 | dce = (__u8) param->pv.i; | 467 | dce = (__u8) param->pv.i; |
468 | 468 | ||
@@ -474,7 +474,7 @@ static int ircomm_param_dce(void *instance, irda_param_t *param, int get) | |||
474 | /* Check if any of the settings have changed */ | 474 | /* Check if any of the settings have changed */ |
475 | if (dce & 0x0f) { | 475 | if (dce & 0x0f) { |
476 | if (dce & IRCOMM_DELTA_CTS) { | 476 | if (dce & IRCOMM_DELTA_CTS) { |
477 | IRDA_DEBUG(2, "%s(), CTS \n", __FUNCTION__ ); | 477 | IRDA_DEBUG(2, "%s(), CTS \n", __func__ ); |
478 | } | 478 | } |
479 | } | 479 | } |
480 | 480 | ||
diff --git a/net/irda/ircomm/ircomm_ttp.c b/net/irda/ircomm/ircomm_ttp.c index 712eafd0cc76..6e6509f22f60 100644 --- a/net/irda/ircomm/ircomm_ttp.c +++ b/net/irda/ircomm/ircomm_ttp.c | |||
@@ -78,7 +78,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) | |||
78 | { | 78 | { |
79 | notify_t notify; | 79 | notify_t notify; |
80 | 80 | ||
81 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 81 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
82 | 82 | ||
83 | /* Register callbacks */ | 83 | /* Register callbacks */ |
84 | irda_notify_init(¬ify); | 84 | irda_notify_init(¬ify); |
@@ -93,7 +93,7 @@ int ircomm_open_tsap(struct ircomm_cb *self) | |||
93 | self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, | 93 | self->tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, |
94 | ¬ify); | 94 | ¬ify); |
95 | if (!self->tsap) { | 95 | if (!self->tsap) { |
96 | IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __FUNCTION__ ); | 96 | IRDA_DEBUG(0, "%sfailed to allocate tsap\n", __func__ ); |
97 | return -1; | 97 | return -1; |
98 | } | 98 | } |
99 | self->slsap_sel = self->tsap->stsap_sel; | 99 | self->slsap_sel = self->tsap->stsap_sel; |
@@ -121,7 +121,7 @@ static int ircomm_ttp_connect_request(struct ircomm_cb *self, | |||
121 | { | 121 | { |
122 | int ret = 0; | 122 | int ret = 0; |
123 | 123 | ||
124 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 124 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
125 | 125 | ||
126 | /* Don't forget to refcount it - should be NULL anyway */ | 126 | /* Don't forget to refcount it - should be NULL anyway */ |
127 | if(userdata) | 127 | if(userdata) |
@@ -145,7 +145,7 @@ static int ircomm_ttp_connect_response(struct ircomm_cb *self, | |||
145 | { | 145 | { |
146 | int ret; | 146 | int ret; |
147 | 147 | ||
148 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 148 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
149 | 149 | ||
150 | /* Don't forget to refcount it - should be NULL anyway */ | 150 | /* Don't forget to refcount it - should be NULL anyway */ |
151 | if(userdata) | 151 | if(userdata) |
@@ -173,7 +173,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, | |||
173 | 173 | ||
174 | IRDA_ASSERT(skb != NULL, return -1;); | 174 | IRDA_ASSERT(skb != NULL, return -1;); |
175 | 175 | ||
176 | IRDA_DEBUG(2, "%s(), clen=%d\n", __FUNCTION__ , clen); | 176 | IRDA_DEBUG(2, "%s(), clen=%d\n", __func__ , clen); |
177 | 177 | ||
178 | /* | 178 | /* |
179 | * Insert clen field, currently we either send data only, or control | 179 | * Insert clen field, currently we either send data only, or control |
@@ -190,7 +190,7 @@ static int ircomm_ttp_data_request(struct ircomm_cb *self, | |||
190 | 190 | ||
191 | ret = irttp_data_request(self->tsap, skb); | 191 | ret = irttp_data_request(self->tsap, skb); |
192 | if (ret) { | 192 | if (ret) { |
193 | IRDA_ERROR("%s(), failed\n", __FUNCTION__); | 193 | IRDA_ERROR("%s(), failed\n", __func__); |
194 | /* irttp_data_request already free the packet */ | 194 | /* irttp_data_request already free the packet */ |
195 | } | 195 | } |
196 | 196 | ||
@@ -208,7 +208,7 @@ static int ircomm_ttp_data_indication(void *instance, void *sap, | |||
208 | { | 208 | { |
209 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 209 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
210 | 210 | ||
211 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 211 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
212 | 212 | ||
213 | IRDA_ASSERT(self != NULL, return -1;); | 213 | IRDA_ASSERT(self != NULL, return -1;); |
214 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); | 214 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;); |
@@ -231,7 +231,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, | |||
231 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 231 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
232 | struct ircomm_info info; | 232 | struct ircomm_info info; |
233 | 233 | ||
234 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 234 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
235 | 235 | ||
236 | IRDA_ASSERT(self != NULL, return;); | 236 | IRDA_ASSERT(self != NULL, return;); |
237 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 237 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -240,7 +240,7 @@ static void ircomm_ttp_connect_confirm(void *instance, void *sap, | |||
240 | 240 | ||
241 | if (max_sdu_size != TTP_SAR_DISABLE) { | 241 | if (max_sdu_size != TTP_SAR_DISABLE) { |
242 | IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", | 242 | IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", |
243 | __FUNCTION__); | 243 | __func__); |
244 | goto out; | 244 | goto out; |
245 | } | 245 | } |
246 | 246 | ||
@@ -272,7 +272,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, | |||
272 | struct ircomm_cb *self = (struct ircomm_cb *)instance; | 272 | struct ircomm_cb *self = (struct ircomm_cb *)instance; |
273 | struct ircomm_info info; | 273 | struct ircomm_info info; |
274 | 274 | ||
275 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 275 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
276 | 276 | ||
277 | IRDA_ASSERT(self != NULL, return;); | 277 | IRDA_ASSERT(self != NULL, return;); |
278 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 278 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -281,7 +281,7 @@ static void ircomm_ttp_connect_indication(void *instance, void *sap, | |||
281 | 281 | ||
282 | if (max_sdu_size != TTP_SAR_DISABLE) { | 282 | if (max_sdu_size != TTP_SAR_DISABLE) { |
283 | IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", | 283 | IRDA_ERROR("%s(), SAR not allowed for IrCOMM!\n", |
284 | __FUNCTION__); | 284 | __func__); |
285 | goto out; | 285 | goto out; |
286 | } | 286 | } |
287 | 287 | ||
@@ -331,7 +331,7 @@ static void ircomm_ttp_disconnect_indication(void *instance, void *sap, | |||
331 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 331 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
332 | struct ircomm_info info; | 332 | struct ircomm_info info; |
333 | 333 | ||
334 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 334 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
335 | 335 | ||
336 | IRDA_ASSERT(self != NULL, return;); | 336 | IRDA_ASSERT(self != NULL, return;); |
337 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 337 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
@@ -356,7 +356,7 @@ static void ircomm_ttp_flow_indication(void *instance, void *sap, | |||
356 | { | 356 | { |
357 | struct ircomm_cb *self = (struct ircomm_cb *) instance; | 357 | struct ircomm_cb *self = (struct ircomm_cb *) instance; |
358 | 358 | ||
359 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 359 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
360 | 360 | ||
361 | IRDA_ASSERT(self != NULL, return;); | 361 | IRDA_ASSERT(self != NULL, return;); |
362 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); | 362 | IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;); |
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 | ||
143 | static void __exit __ircomm_tty_cleanup(struct ircomm_tty_cb *self) | 143 | static 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 | */ |
1038 | static void ircomm_tty_send_xchar(struct tty_struct *tty, char ch) | 1038 | static 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 | } |
diff --git a/net/irda/ircomm/ircomm_tty_attach.c b/net/irda/ircomm/ircomm_tty_attach.c index b5a13882c927..9032a1d1190d 100644 --- a/net/irda/ircomm/ircomm_tty_attach.c +++ b/net/irda/ircomm/ircomm_tty_attach.c | |||
@@ -129,14 +129,14 @@ static int (*state[])(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, | |||
129 | */ | 129 | */ |
130 | int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) | 130 | int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) |
131 | { | 131 | { |
132 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 132 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
133 | 133 | ||
134 | IRDA_ASSERT(self != NULL, return -1;); | 134 | IRDA_ASSERT(self != NULL, return -1;); |
135 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 135 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
136 | 136 | ||
137 | /* Check if somebody has already connected to us */ | 137 | /* Check if somebody has already connected to us */ |
138 | if (ircomm_is_connected(self->ircomm)) { | 138 | if (ircomm_is_connected(self->ircomm)) { |
139 | IRDA_DEBUG(0, "%s(), already connected!\n", __FUNCTION__ ); | 139 | IRDA_DEBUG(0, "%s(), already connected!\n", __func__ ); |
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
@@ -158,7 +158,7 @@ int ircomm_tty_attach_cable(struct ircomm_tty_cb *self) | |||
158 | */ | 158 | */ |
159 | void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) | 159 | void ircomm_tty_detach_cable(struct ircomm_tty_cb *self) |
160 | { | 160 | { |
161 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 161 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
162 | 162 | ||
163 | IRDA_ASSERT(self != NULL, return;); | 163 | IRDA_ASSERT(self != NULL, return;); |
164 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 164 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -207,7 +207,7 @@ static void ircomm_tty_ias_register(struct ircomm_tty_cb *self) | |||
207 | __u8 oct_seq[6]; | 207 | __u8 oct_seq[6]; |
208 | __u16 hints; | 208 | __u16 hints; |
209 | 209 | ||
210 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 210 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
211 | 211 | ||
212 | IRDA_ASSERT(self != NULL, return;); | 212 | IRDA_ASSERT(self != NULL, return;); |
213 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 213 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -308,16 +308,16 @@ int ircomm_tty_send_initial_parameters(struct ircomm_tty_cb *self) | |||
308 | * Set default values, but only if the application for some reason | 308 | * Set default values, but only if the application for some reason |
309 | * haven't set them already | 309 | * haven't set them already |
310 | */ | 310 | */ |
311 | IRDA_DEBUG(2, "%s(), data-rate = %d\n", __FUNCTION__ , | 311 | IRDA_DEBUG(2, "%s(), data-rate = %d\n", __func__ , |
312 | self->settings.data_rate); | 312 | self->settings.data_rate); |
313 | if (!self->settings.data_rate) | 313 | if (!self->settings.data_rate) |
314 | self->settings.data_rate = 9600; | 314 | self->settings.data_rate = 9600; |
315 | IRDA_DEBUG(2, "%s(), data-format = %d\n", __FUNCTION__ , | 315 | IRDA_DEBUG(2, "%s(), data-format = %d\n", __func__ , |
316 | self->settings.data_format); | 316 | self->settings.data_format); |
317 | if (!self->settings.data_format) | 317 | if (!self->settings.data_format) |
318 | self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ | 318 | self->settings.data_format = IRCOMM_WSIZE_8; /* 8N1 */ |
319 | 319 | ||
320 | IRDA_DEBUG(2, "%s(), flow-control = %d\n", __FUNCTION__ , | 320 | IRDA_DEBUG(2, "%s(), flow-control = %d\n", __func__ , |
321 | self->settings.flow_control); | 321 | self->settings.flow_control); |
322 | /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ | 322 | /*self->settings.flow_control = IRCOMM_RTS_CTS_IN|IRCOMM_RTS_CTS_OUT;*/ |
323 | 323 | ||
@@ -362,7 +362,7 @@ static void ircomm_tty_discovery_indication(discinfo_t *discovery, | |||
362 | struct ircomm_tty_cb *self; | 362 | struct ircomm_tty_cb *self; |
363 | struct ircomm_tty_info info; | 363 | struct ircomm_tty_info info; |
364 | 364 | ||
365 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 365 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
366 | 366 | ||
367 | /* Important note : | 367 | /* Important note : |
368 | * We need to drop all passive discoveries. | 368 | * We need to drop all passive discoveries. |
@@ -398,7 +398,7 @@ void ircomm_tty_disconnect_indication(void *instance, void *sap, | |||
398 | { | 398 | { |
399 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 399 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
400 | 400 | ||
401 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 401 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
402 | 402 | ||
403 | IRDA_ASSERT(self != NULL, return;); | 403 | IRDA_ASSERT(self != NULL, return;); |
404 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 404 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -428,7 +428,7 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
428 | { | 428 | { |
429 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; | 429 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) priv; |
430 | 430 | ||
431 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 431 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
432 | 432 | ||
433 | IRDA_ASSERT(self != NULL, return;); | 433 | IRDA_ASSERT(self != NULL, return;); |
434 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 434 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -439,13 +439,13 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
439 | 439 | ||
440 | /* Check if request succeeded */ | 440 | /* Check if request succeeded */ |
441 | if (result != IAS_SUCCESS) { | 441 | if (result != IAS_SUCCESS) { |
442 | IRDA_DEBUG(4, "%s(), got NULL value!\n", __FUNCTION__ ); | 442 | IRDA_DEBUG(4, "%s(), got NULL value!\n", __func__ ); |
443 | return; | 443 | return; |
444 | } | 444 | } |
445 | 445 | ||
446 | switch (value->type) { | 446 | switch (value->type) { |
447 | case IAS_OCT_SEQ: | 447 | case IAS_OCT_SEQ: |
448 | IRDA_DEBUG(2, "%s(), got octet sequence\n", __FUNCTION__ ); | 448 | IRDA_DEBUG(2, "%s(), got octet sequence\n", __func__ ); |
449 | 449 | ||
450 | irda_param_extract_all(self, value->t.oct_seq, value->len, | 450 | irda_param_extract_all(self, value->t.oct_seq, value->len, |
451 | &ircomm_param_info); | 451 | &ircomm_param_info); |
@@ -455,21 +455,21 @@ static void ircomm_tty_getvalue_confirm(int result, __u16 obj_id, | |||
455 | break; | 455 | break; |
456 | case IAS_INTEGER: | 456 | case IAS_INTEGER: |
457 | /* Got LSAP selector */ | 457 | /* Got LSAP selector */ |
458 | IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __FUNCTION__ , | 458 | IRDA_DEBUG(2, "%s(), got lsapsel = %d\n", __func__ , |
459 | value->t.integer); | 459 | value->t.integer); |
460 | 460 | ||
461 | if (value->t.integer == -1) { | 461 | if (value->t.integer == -1) { |
462 | IRDA_DEBUG(0, "%s(), invalid value!\n", __FUNCTION__ ); | 462 | IRDA_DEBUG(0, "%s(), invalid value!\n", __func__ ); |
463 | } else | 463 | } else |
464 | self->dlsap_sel = value->t.integer; | 464 | self->dlsap_sel = value->t.integer; |
465 | 465 | ||
466 | ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); | 466 | ircomm_tty_do_event(self, IRCOMM_TTY_GOT_LSAPSEL, NULL, NULL); |
467 | break; | 467 | break; |
468 | case IAS_MISSING: | 468 | case IAS_MISSING: |
469 | IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __FUNCTION__ ); | 469 | IRDA_DEBUG(0, "%s(), got IAS_MISSING\n", __func__ ); |
470 | break; | 470 | break; |
471 | default: | 471 | default: |
472 | IRDA_DEBUG(0, "%s(), got unknown type!\n", __FUNCTION__ ); | 472 | IRDA_DEBUG(0, "%s(), got unknown type!\n", __func__ ); |
473 | break; | 473 | break; |
474 | } | 474 | } |
475 | irias_delete_value(value); | 475 | irias_delete_value(value); |
@@ -489,7 +489,7 @@ void ircomm_tty_connect_confirm(void *instance, void *sap, | |||
489 | { | 489 | { |
490 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 490 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
491 | 491 | ||
492 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 492 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
493 | 493 | ||
494 | IRDA_ASSERT(self != NULL, return;); | 494 | IRDA_ASSERT(self != NULL, return;); |
495 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 495 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -520,7 +520,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, | |||
520 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; | 520 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) instance; |
521 | int clen; | 521 | int clen; |
522 | 522 | ||
523 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 523 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
524 | 524 | ||
525 | IRDA_ASSERT(self != NULL, return;); | 525 | IRDA_ASSERT(self != NULL, return;); |
526 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 526 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -549,7 +549,7 @@ void ircomm_tty_connect_indication(void *instance, void *sap, | |||
549 | */ | 549 | */ |
550 | void ircomm_tty_link_established(struct ircomm_tty_cb *self) | 550 | void ircomm_tty_link_established(struct ircomm_tty_cb *self) |
551 | { | 551 | { |
552 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 552 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
553 | 553 | ||
554 | IRDA_ASSERT(self != NULL, return;); | 554 | IRDA_ASSERT(self != NULL, return;); |
555 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 555 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -566,10 +566,10 @@ void ircomm_tty_link_established(struct ircomm_tty_cb *self) | |||
566 | * line. | 566 | * line. |
567 | */ | 567 | */ |
568 | if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) { | 568 | if ((self->flags & ASYNC_CTS_FLOW) && ((self->settings.dce & IRCOMM_CTS) == 0)) { |
569 | IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __FUNCTION__ ); | 569 | IRDA_DEBUG(0, "%s(), waiting for CTS ...\n", __func__ ); |
570 | return; | 570 | return; |
571 | } else { | 571 | } else { |
572 | IRDA_DEBUG(1, "%s(), starting hardware!\n", __FUNCTION__ ); | 572 | IRDA_DEBUG(1, "%s(), starting hardware!\n", __func__ ); |
573 | 573 | ||
574 | self->tty->hw_stopped = 0; | 574 | self->tty->hw_stopped = 0; |
575 | 575 | ||
@@ -607,7 +607,7 @@ static void ircomm_tty_watchdog_timer_expired(void *data) | |||
607 | { | 607 | { |
608 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; | 608 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) data; |
609 | 609 | ||
610 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 610 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
611 | 611 | ||
612 | IRDA_ASSERT(self != NULL, return;); | 612 | IRDA_ASSERT(self != NULL, return;); |
613 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 613 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
@@ -628,7 +628,7 @@ int ircomm_tty_do_event(struct ircomm_tty_cb *self, IRCOMM_TTY_EVENT event, | |||
628 | IRDA_ASSERT(self != NULL, return -1;); | 628 | IRDA_ASSERT(self != NULL, return -1;); |
629 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); | 629 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); |
630 | 630 | ||
631 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 631 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
632 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 632 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
633 | 633 | ||
634 | return (*state[self->state])(self, event, skb, info); | 634 | return (*state[self->state])(self, event, skb, info); |
@@ -646,7 +646,7 @@ static inline void ircomm_tty_next_state(struct ircomm_tty_cb *self, IRCOMM_TTY_ | |||
646 | IRDA_ASSERT(self != NULL, return;); | 646 | IRDA_ASSERT(self != NULL, return;); |
647 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); | 647 | IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return;); |
648 | 648 | ||
649 | IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __FUNCTION__ , | 649 | IRDA_DEBUG(2, "%s: next state=%s, service type=%d\n", __func__ , |
650 | ircomm_tty_state[self->state], self->service_type); | 650 | ircomm_tty_state[self->state], self->service_type); |
651 | */ | 651 | */ |
652 | self->state = state; | 652 | self->state = state; |
@@ -665,7 +665,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, | |||
665 | { | 665 | { |
666 | int ret = 0; | 666 | int ret = 0; |
667 | 667 | ||
668 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 668 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
669 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 669 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
670 | switch (event) { | 670 | switch (event) { |
671 | case IRCOMM_TTY_ATTACH_CABLE: | 671 | case IRCOMM_TTY_ATTACH_CABLE: |
@@ -681,7 +681,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, | |||
681 | 681 | ||
682 | if (self->iriap) { | 682 | if (self->iriap) { |
683 | IRDA_WARNING("%s(), busy with a previous query\n", | 683 | IRDA_WARNING("%s(), busy with a previous query\n", |
684 | __FUNCTION__); | 684 | __func__); |
685 | return -EBUSY; | 685 | return -EBUSY; |
686 | } | 686 | } |
687 | 687 | ||
@@ -709,7 +709,7 @@ static int ircomm_tty_state_idle(struct ircomm_tty_cb *self, | |||
709 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 709 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
710 | break; | 710 | break; |
711 | default: | 711 | default: |
712 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 712 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
713 | ircomm_tty_event[event]); | 713 | ircomm_tty_event[event]); |
714 | ret = -EINVAL; | 714 | ret = -EINVAL; |
715 | } | 715 | } |
@@ -729,7 +729,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, | |||
729 | { | 729 | { |
730 | int ret = 0; | 730 | int ret = 0; |
731 | 731 | ||
732 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 732 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
733 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 733 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
734 | 734 | ||
735 | switch (event) { | 735 | switch (event) { |
@@ -739,7 +739,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, | |||
739 | 739 | ||
740 | if (self->iriap) { | 740 | if (self->iriap) { |
741 | IRDA_WARNING("%s(), busy with a previous query\n", | 741 | IRDA_WARNING("%s(), busy with a previous query\n", |
742 | __FUNCTION__); | 742 | __func__); |
743 | return -EBUSY; | 743 | return -EBUSY; |
744 | } | 744 | } |
745 | 745 | ||
@@ -782,7 +782,7 @@ static int ircomm_tty_state_search(struct ircomm_tty_cb *self, | |||
782 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 782 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
783 | break; | 783 | break; |
784 | default: | 784 | default: |
785 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 785 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
786 | ircomm_tty_event[event]); | 786 | ircomm_tty_event[event]); |
787 | ret = -EINVAL; | 787 | ret = -EINVAL; |
788 | } | 788 | } |
@@ -802,14 +802,14 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, | |||
802 | { | 802 | { |
803 | int ret = 0; | 803 | int ret = 0; |
804 | 804 | ||
805 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 805 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
806 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 806 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
807 | 807 | ||
808 | switch (event) { | 808 | switch (event) { |
809 | case IRCOMM_TTY_GOT_PARAMETERS: | 809 | case IRCOMM_TTY_GOT_PARAMETERS: |
810 | if (self->iriap) { | 810 | if (self->iriap) { |
811 | IRDA_WARNING("%s(), busy with a previous query\n", | 811 | IRDA_WARNING("%s(), busy with a previous query\n", |
812 | __FUNCTION__); | 812 | __func__); |
813 | return -EBUSY; | 813 | return -EBUSY; |
814 | } | 814 | } |
815 | 815 | ||
@@ -840,7 +840,7 @@ static int ircomm_tty_state_query_parameters(struct ircomm_tty_cb *self, | |||
840 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 840 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
841 | break; | 841 | break; |
842 | default: | 842 | default: |
843 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 843 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
844 | ircomm_tty_event[event]); | 844 | ircomm_tty_event[event]); |
845 | ret = -EINVAL; | 845 | ret = -EINVAL; |
846 | } | 846 | } |
@@ -860,7 +860,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, | |||
860 | { | 860 | { |
861 | int ret = 0; | 861 | int ret = 0; |
862 | 862 | ||
863 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 863 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
864 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 864 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
865 | 865 | ||
866 | switch (event) { | 866 | switch (event) { |
@@ -889,7 +889,7 @@ static int ircomm_tty_state_query_lsap_sel(struct ircomm_tty_cb *self, | |||
889 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 889 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
890 | break; | 890 | break; |
891 | default: | 891 | default: |
892 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 892 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
893 | ircomm_tty_event[event]); | 893 | ircomm_tty_event[event]); |
894 | ret = -EINVAL; | 894 | ret = -EINVAL; |
895 | } | 895 | } |
@@ -909,7 +909,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, | |||
909 | { | 909 | { |
910 | int ret = 0; | 910 | int ret = 0; |
911 | 911 | ||
912 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __FUNCTION__ , | 912 | IRDA_DEBUG(2, "%s: state=%s, event=%s\n", __func__ , |
913 | ircomm_tty_state[self->state], ircomm_tty_event[event]); | 913 | ircomm_tty_state[self->state], ircomm_tty_event[event]); |
914 | 914 | ||
915 | switch (event) { | 915 | switch (event) { |
@@ -943,7 +943,7 @@ static int ircomm_tty_state_setup(struct ircomm_tty_cb *self, | |||
943 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); | 943 | ircomm_tty_next_state(self, IRCOMM_TTY_IDLE); |
944 | break; | 944 | break; |
945 | default: | 945 | default: |
946 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 946 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
947 | ircomm_tty_event[event]); | 947 | ircomm_tty_event[event]); |
948 | ret = -EINVAL; | 948 | ret = -EINVAL; |
949 | } | 949 | } |
@@ -981,13 +981,13 @@ static int ircomm_tty_state_ready(struct ircomm_tty_cb *self, | |||
981 | self->settings.dce = IRCOMM_DELTA_CD; | 981 | self->settings.dce = IRCOMM_DELTA_CD; |
982 | ircomm_tty_check_modem_status(self); | 982 | ircomm_tty_check_modem_status(self); |
983 | } else { | 983 | } else { |
984 | IRDA_DEBUG(0, "%s(), hanging up!\n", __FUNCTION__ ); | 984 | IRDA_DEBUG(0, "%s(), hanging up!\n", __func__ ); |
985 | if (self->tty) | 985 | if (self->tty) |
986 | tty_hangup(self->tty); | 986 | tty_hangup(self->tty); |
987 | } | 987 | } |
988 | break; | 988 | break; |
989 | default: | 989 | default: |
990 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __FUNCTION__ , | 990 | IRDA_DEBUG(2, "%s(), unknown event: %s\n", __func__ , |
991 | ircomm_tty_event[event]); | 991 | ircomm_tty_event[event]); |
992 | ret = -EINVAL; | 992 | ret = -EINVAL; |
993 | } | 993 | } |
diff --git a/net/irda/ircomm/ircomm_tty_ioctl.c b/net/irda/ircomm/ircomm_tty_ioctl.c index 6030947b6d93..24cb3aa2bbfb 100644 --- a/net/irda/ircomm/ircomm_tty_ioctl.c +++ b/net/irda/ircomm/ircomm_tty_ioctl.c | |||
@@ -57,7 +57,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
57 | unsigned cflag, cval; | 57 | unsigned cflag, cval; |
58 | int baud; | 58 | int baud; |
59 | 59 | ||
60 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 60 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
61 | 61 | ||
62 | if (!self->tty || !self->tty->termios || !self->ircomm) | 62 | if (!self->tty || !self->tty->termios || !self->ircomm) |
63 | return; | 63 | return; |
@@ -94,7 +94,7 @@ static void ircomm_tty_change_speed(struct ircomm_tty_cb *self) | |||
94 | self->settings.flow_control |= IRCOMM_RTS_CTS_IN; | 94 | self->settings.flow_control |= IRCOMM_RTS_CTS_IN; |
95 | /* This got me. Bummer. Jean II */ | 95 | /* This got me. Bummer. Jean II */ |
96 | if (self->service_type == IRCOMM_3_WIRE_RAW) | 96 | if (self->service_type == IRCOMM_3_WIRE_RAW) |
97 | IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __FUNCTION__); | 97 | IRDA_WARNING("%s(), enabling RTS/CTS on link that doesn't support it (3-wire-raw)\n", __func__); |
98 | } else { | 98 | } else { |
99 | self->flags &= ~ASYNC_CTS_FLOW; | 99 | self->flags &= ~ASYNC_CTS_FLOW; |
100 | self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; | 100 | self->settings.flow_control &= ~IRCOMM_RTS_CTS_IN; |
@@ -150,7 +150,7 @@ void ircomm_tty_set_termios(struct tty_struct *tty, | |||
150 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 150 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
151 | unsigned int cflag = tty->termios->c_cflag; | 151 | unsigned int cflag = tty->termios->c_cflag; |
152 | 152 | ||
153 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 153 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
154 | 154 | ||
155 | if ((cflag == old_termios->c_cflag) && | 155 | if ((cflag == old_termios->c_cflag) && |
156 | (RELEVANT_IFLAG(tty->termios->c_iflag) == | 156 | (RELEVANT_IFLAG(tty->termios->c_iflag) == |
@@ -199,7 +199,7 @@ int ircomm_tty_tiocmget(struct tty_struct *tty, struct file *file) | |||
199 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 199 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
200 | unsigned int result; | 200 | unsigned int result; |
201 | 201 | ||
202 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 202 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
203 | 203 | ||
204 | if (tty->flags & (1 << TTY_IO_ERROR)) | 204 | if (tty->flags & (1 << TTY_IO_ERROR)) |
205 | return -EIO; | 205 | return -EIO; |
@@ -224,7 +224,7 @@ int ircomm_tty_tiocmset(struct tty_struct *tty, struct file *file, | |||
224 | { | 224 | { |
225 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 225 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
226 | 226 | ||
227 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 227 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
228 | 228 | ||
229 | if (tty->flags & (1 << TTY_IO_ERROR)) | 229 | if (tty->flags & (1 << TTY_IO_ERROR)) |
230 | return -EIO; | 230 | return -EIO; |
@@ -266,7 +266,7 @@ static int ircomm_tty_get_serial_info(struct ircomm_tty_cb *self, | |||
266 | if (!retinfo) | 266 | if (!retinfo) |
267 | return -EFAULT; | 267 | return -EFAULT; |
268 | 268 | ||
269 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 269 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
270 | 270 | ||
271 | memset(&info, 0, sizeof(info)); | 271 | memset(&info, 0, sizeof(info)); |
272 | info.line = self->line; | 272 | info.line = self->line; |
@@ -302,7 +302,7 @@ static int ircomm_tty_set_serial_info(struct ircomm_tty_cb *self, | |||
302 | struct serial_struct new_serial; | 302 | struct serial_struct new_serial; |
303 | struct ircomm_tty_cb old_state, *state; | 303 | struct ircomm_tty_cb old_state, *state; |
304 | 304 | ||
305 | IRDA_DEBUG(0, "%s()\n", __FUNCTION__ ); | 305 | IRDA_DEBUG(0, "%s()\n", __func__ ); |
306 | 306 | ||
307 | if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) | 307 | if (copy_from_user(&new_serial,new_info,sizeof(new_serial))) |
308 | return -EFAULT; | 308 | return -EFAULT; |
@@ -376,7 +376,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
376 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; | 376 | struct ircomm_tty_cb *self = (struct ircomm_tty_cb *) tty->driver_data; |
377 | int ret = 0; | 377 | int ret = 0; |
378 | 378 | ||
379 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 379 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
380 | 380 | ||
381 | if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && | 381 | if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) && |
382 | (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && | 382 | (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) && |
@@ -397,7 +397,7 @@ int ircomm_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
397 | break; | 397 | break; |
398 | 398 | ||
399 | case TIOCGICOUNT: | 399 | case TIOCGICOUNT: |
400 | IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __FUNCTION__ ); | 400 | IRDA_DEBUG(0, "%s(), TIOCGICOUNT not impl!\n", __func__ ); |
401 | #if 0 | 401 | #if 0 |
402 | save_flags(flags); cli(); | 402 | save_flags(flags); cli(); |
403 | cnow = driver->icount; | 403 | cnow = driver->icount; |