diff options
author | Matthias Urlichs <smurf@smurf.noris.de> | 2008-08-15 18:04:33 -0400 |
---|---|---|
committer | Karsten Keil <kkeil@suse.de> | 2009-01-09 16:44:24 -0500 |
commit | 837468d135dcc49cdabc9fa92fc9550479f60704 (patch) | |
tree | 354aace7616729beac5ae52165b9470651145193 /drivers/isdn/mISDN/stack.c | |
parent | 8b6015f736125050722dbe59c4f943e78cd626f0 (diff) |
mISDN: Use struct device name field
struct device already has a 'name' member, use it.
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Diffstat (limited to 'drivers/isdn/mISDN/stack.c')
-rw-r--r-- | drivers/isdn/mISDN/stack.c | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index d55b14ae4e99..9b9fab47cb2b 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c | |||
@@ -172,7 +172,8 @@ send_msg_to_layer(struct mISDNstack *st, struct sk_buff *skb) | |||
172 | else | 172 | else |
173 | printk(KERN_WARNING | 173 | printk(KERN_WARNING |
174 | "%s: dev(%s) prim(%x) id(%x) no channel\n", | 174 | "%s: dev(%s) prim(%x) id(%x) no channel\n", |
175 | __func__, st->dev->name, hh->prim, hh->id); | 175 | __func__, dev_name(&st->dev->dev), hh->prim, |
176 | hh->id); | ||
176 | } else if (lm == 0x8) { | 177 | } else if (lm == 0x8) { |
177 | WARN_ON(lm == 0x8); | 178 | WARN_ON(lm == 0x8); |
178 | ch = get_channel4id(st, hh->id); | 179 | ch = get_channel4id(st, hh->id); |
@@ -181,11 +182,12 @@ send_msg_to_layer(struct mISDNstack *st, struct sk_buff *skb) | |||
181 | else | 182 | else |
182 | printk(KERN_WARNING | 183 | printk(KERN_WARNING |
183 | "%s: dev(%s) prim(%x) id(%x) no channel\n", | 184 | "%s: dev(%s) prim(%x) id(%x) no channel\n", |
184 | __func__, st->dev->name, hh->prim, hh->id); | 185 | __func__, dev_name(&st->dev->dev), hh->prim, |
186 | hh->id); | ||
185 | } else { | 187 | } else { |
186 | /* broadcast not handled yet */ | 188 | /* broadcast not handled yet */ |
187 | printk(KERN_WARNING "%s: dev(%s) prim %x not delivered\n", | 189 | printk(KERN_WARNING "%s: dev(%s) prim %x not delivered\n", |
188 | __func__, st->dev->name, hh->prim); | 190 | __func__, dev_name(&st->dev->dev), hh->prim); |
189 | } | 191 | } |
190 | return -ESRCH; | 192 | return -ESRCH; |
191 | } | 193 | } |
@@ -209,7 +211,8 @@ mISDNStackd(void *data) | |||
209 | unlock_kernel(); | 211 | unlock_kernel(); |
210 | #endif | 212 | #endif |
211 | if (*debug & DEBUG_MSG_THREAD) | 213 | if (*debug & DEBUG_MSG_THREAD) |
212 | printk(KERN_DEBUG "mISDNStackd %s started\n", st->dev->name); | 214 | printk(KERN_DEBUG "mISDNStackd %s started\n", |
215 | dev_name(&st->dev->dev)); | ||
213 | 216 | ||
214 | if (st->notify != NULL) { | 217 | if (st->notify != NULL) { |
215 | complete(st->notify); | 218 | complete(st->notify); |
@@ -245,7 +248,7 @@ mISDNStackd(void *data) | |||
245 | printk(KERN_DEBUG | 248 | printk(KERN_DEBUG |
246 | "%s: %s prim(%x) id(%x) " | 249 | "%s: %s prim(%x) id(%x) " |
247 | "send call(%d)\n", | 250 | "send call(%d)\n", |
248 | __func__, st->dev->name, | 251 | __func__, dev_name(&st->dev->dev), |
249 | mISDN_HEAD_PRIM(skb), | 252 | mISDN_HEAD_PRIM(skb), |
250 | mISDN_HEAD_ID(skb), err); | 253 | mISDN_HEAD_ID(skb), err); |
251 | dev_kfree_skb(skb); | 254 | dev_kfree_skb(skb); |
@@ -288,7 +291,7 @@ mISDNStackd(void *data) | |||
288 | mISDN_STACK_ACTION_MASK)); | 291 | mISDN_STACK_ACTION_MASK)); |
289 | if (*debug & DEBUG_MSG_THREAD) | 292 | if (*debug & DEBUG_MSG_THREAD) |
290 | printk(KERN_DEBUG "%s: %s wake status %08lx\n", | 293 | printk(KERN_DEBUG "%s: %s wake status %08lx\n", |
291 | __func__, st->dev->name, st->status); | 294 | __func__, dev_name(&st->dev->dev), st->status); |
292 | test_and_set_bit(mISDN_STACK_ACTIVE, &st->status); | 295 | test_and_set_bit(mISDN_STACK_ACTIVE, &st->status); |
293 | 296 | ||
294 | test_and_clear_bit(mISDN_STACK_WAKEUP, &st->status); | 297 | test_and_clear_bit(mISDN_STACK_WAKEUP, &st->status); |
@@ -303,15 +306,16 @@ mISDNStackd(void *data) | |||
303 | #ifdef MISDN_MSG_STATS | 306 | #ifdef MISDN_MSG_STATS |
304 | printk(KERN_DEBUG "mISDNStackd daemon for %s proceed %d " | 307 | printk(KERN_DEBUG "mISDNStackd daemon for %s proceed %d " |
305 | "msg %d sleep %d stopped\n", | 308 | "msg %d sleep %d stopped\n", |
306 | st->dev->name, st->msg_cnt, st->sleep_cnt, st->stopped_cnt); | 309 | dev_name(&st->dev->dev), st->msg_cnt, st->sleep_cnt, |
310 | st->stopped_cnt); | ||
307 | printk(KERN_DEBUG | 311 | printk(KERN_DEBUG |
308 | "mISDNStackd daemon for %s utime(%ld) stime(%ld)\n", | 312 | "mISDNStackd daemon for %s utime(%ld) stime(%ld)\n", |
309 | st->dev->name, st->thread->utime, st->thread->stime); | 313 | dev_name(&st->dev->dev), st->thread->utime, st->thread->stime); |
310 | printk(KERN_DEBUG | 314 | printk(KERN_DEBUG |
311 | "mISDNStackd daemon for %s nvcsw(%ld) nivcsw(%ld)\n", | 315 | "mISDNStackd daemon for %s nvcsw(%ld) nivcsw(%ld)\n", |
312 | st->dev->name, st->thread->nvcsw, st->thread->nivcsw); | 316 | dev_name(&st->dev->dev), st->thread->nvcsw, st->thread->nivcsw); |
313 | printk(KERN_DEBUG "mISDNStackd daemon for %s killed now\n", | 317 | printk(KERN_DEBUG "mISDNStackd daemon for %s killed now\n", |
314 | st->dev->name); | 318 | dev_name(&st->dev->dev)); |
315 | #endif | 319 | #endif |
316 | test_and_set_bit(mISDN_STACK_KILLED, &st->status); | 320 | test_and_set_bit(mISDN_STACK_KILLED, &st->status); |
317 | test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); | 321 | test_and_clear_bit(mISDN_STACK_RUNNING, &st->status); |
@@ -401,15 +405,16 @@ create_stack(struct mISDNdevice *dev) | |||
401 | newst->own.send = mISDN_queue_message; | 405 | newst->own.send = mISDN_queue_message; |
402 | newst->own.recv = mISDN_queue_message; | 406 | newst->own.recv = mISDN_queue_message; |
403 | if (*debug & DEBUG_CORE_FUNC) | 407 | if (*debug & DEBUG_CORE_FUNC) |
404 | printk(KERN_DEBUG "%s: st(%s)\n", __func__, newst->dev->name); | 408 | printk(KERN_DEBUG "%s: st(%s)\n", __func__, |
409 | dev_name(&newst->dev->dev)); | ||
405 | newst->notify = &done; | 410 | newst->notify = &done; |
406 | newst->thread = kthread_run(mISDNStackd, (void *)newst, "mISDN_%s", | 411 | newst->thread = kthread_run(mISDNStackd, (void *)newst, "mISDN_%s", |
407 | newst->dev->name); | 412 | dev_name(&newst->dev->dev)); |
408 | if (IS_ERR(newst->thread)) { | 413 | if (IS_ERR(newst->thread)) { |
409 | err = PTR_ERR(newst->thread); | 414 | err = PTR_ERR(newst->thread); |
410 | printk(KERN_ERR | 415 | printk(KERN_ERR |
411 | "mISDN:cannot create kernel thread for %s (%d)\n", | 416 | "mISDN:cannot create kernel thread for %s (%d)\n", |
412 | newst->dev->name, err); | 417 | dev_name(&newst->dev->dev), err); |
413 | delete_teimanager(dev->teimgr); | 418 | delete_teimanager(dev->teimgr); |
414 | kfree(newst); | 419 | kfree(newst); |
415 | } else | 420 | } else |
@@ -428,8 +433,8 @@ connect_layer1(struct mISDNdevice *dev, struct mISDNchannel *ch, | |||
428 | 433 | ||
429 | if (*debug & DEBUG_CORE_FUNC) | 434 | if (*debug & DEBUG_CORE_FUNC) |
430 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", | 435 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", |
431 | __func__, dev->name, protocol, adr->dev, adr->channel, | 436 | __func__, dev_name(&dev->dev), protocol, adr->dev, |
432 | adr->sapi, adr->tei); | 437 | adr->channel, adr->sapi, adr->tei); |
433 | switch (protocol) { | 438 | switch (protocol) { |
434 | case ISDN_P_NT_S0: | 439 | case ISDN_P_NT_S0: |
435 | case ISDN_P_NT_E1: | 440 | case ISDN_P_NT_E1: |
@@ -473,7 +478,7 @@ connect_Bstack(struct mISDNdevice *dev, struct mISDNchannel *ch, | |||
473 | 478 | ||
474 | if (*debug & DEBUG_CORE_FUNC) | 479 | if (*debug & DEBUG_CORE_FUNC) |
475 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", | 480 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", |
476 | __func__, dev->name, protocol, | 481 | __func__, dev_name(&dev->dev), protocol, |
477 | adr->dev, adr->channel, adr->sapi, | 482 | adr->dev, adr->channel, adr->sapi, |
478 | adr->tei); | 483 | adr->tei); |
479 | ch->st = dev->D.st; | 484 | ch->st = dev->D.st; |
@@ -529,7 +534,7 @@ create_l2entity(struct mISDNdevice *dev, struct mISDNchannel *ch, | |||
529 | 534 | ||
530 | if (*debug & DEBUG_CORE_FUNC) | 535 | if (*debug & DEBUG_CORE_FUNC) |
531 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", | 536 | printk(KERN_DEBUG "%s: %s proto(%x) adr(%d %d %d %d)\n", |
532 | __func__, dev->name, protocol, | 537 | __func__, dev_name(&dev->dev), protocol, |
533 | adr->dev, adr->channel, adr->sapi, | 538 | adr->dev, adr->channel, adr->sapi, |
534 | adr->tei); | 539 | adr->tei); |
535 | rq.protocol = ISDN_P_TE_S0; | 540 | rq.protocol = ISDN_P_TE_S0; |
@@ -590,7 +595,7 @@ delete_channel(struct mISDNchannel *ch) | |||
590 | } | 595 | } |
591 | if (*debug & DEBUG_CORE_FUNC) | 596 | if (*debug & DEBUG_CORE_FUNC) |
592 | printk(KERN_DEBUG "%s: st(%s) protocol(%x)\n", __func__, | 597 | printk(KERN_DEBUG "%s: st(%s) protocol(%x)\n", __func__, |
593 | ch->st->dev->name, ch->protocol); | 598 | dev_name(&ch->st->dev->dev), ch->protocol); |
594 | if (ch->protocol >= ISDN_P_B_START) { | 599 | if (ch->protocol >= ISDN_P_B_START) { |
595 | if (ch->peer) { | 600 | if (ch->peer) { |
596 | ch->peer->ctrl(ch->peer, CLOSE_CHANNEL, NULL); | 601 | ch->peer->ctrl(ch->peer, CLOSE_CHANNEL, NULL); |
@@ -643,7 +648,7 @@ delete_stack(struct mISDNdevice *dev) | |||
643 | 648 | ||
644 | if (*debug & DEBUG_CORE_FUNC) | 649 | if (*debug & DEBUG_CORE_FUNC) |
645 | printk(KERN_DEBUG "%s: st(%s)\n", __func__, | 650 | printk(KERN_DEBUG "%s: st(%s)\n", __func__, |
646 | st->dev->name); | 651 | dev_name(&st->dev->dev)); |
647 | if (dev->teimgr) | 652 | if (dev->teimgr) |
648 | delete_teimanager(dev->teimgr); | 653 | delete_teimanager(dev->teimgr); |
649 | if (st->thread) { | 654 | if (st->thread) { |