aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/common.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2008-12-26 04:21:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-26 04:21:29 -0500
commitc8770dcabd6a615b155c25dc4d57251d3e7f151c (patch)
tree3f8bbf9d4f17525440b22bfb702f35a9f7bdf033 /drivers/isdn/gigaset/common.c
parent4d8cd002602987ddc9507b5390800343f820ac92 (diff)
gigaset: use pr_err() and pr_info()
Switch from private printk wrapper macros to using pr_err() and pr_info() from linux/kernel.h, at the same time unifying a few error messages. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset/common.c')
-rw-r--r--drivers/isdn/gigaset/common.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index 1664e31a78c3..0048ce98bfa8 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -580,7 +580,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
580 } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL) 580 } else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
581 skb_reserve(bcs->skb, HW_HDR_LEN); 581 skb_reserve(bcs->skb, HW_HDR_LEN);
582 else { 582 else {
583 err("could not allocate skb"); 583 pr_err("out of memory\n");
584 bcs->inputstate |= INS_skip_frame; 584 bcs->inputstate |= INS_skip_frame;
585 } 585 }
586 586
@@ -634,20 +634,20 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
634 634
635 gig_dbg(DEBUG_INIT, "allocating cs"); 635 gig_dbg(DEBUG_INIT, "allocating cs");
636 if (!(cs = alloc_cs(drv))) { 636 if (!(cs = alloc_cs(drv))) {
637 err("maximum number of devices exceeded"); 637 pr_err("maximum number of devices exceeded\n");
638 return NULL; 638 return NULL;
639 } 639 }
640 640
641 gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); 641 gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1);
642 cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); 642 cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL);
643 if (!cs->bcs) { 643 if (!cs->bcs) {
644 err("out of memory"); 644 pr_err("out of memory\n");
645 goto error; 645 goto error;
646 } 646 }
647 gig_dbg(DEBUG_INIT, "allocating inbuf"); 647 gig_dbg(DEBUG_INIT, "allocating inbuf");
648 cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL); 648 cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL);
649 if (!cs->inbuf) { 649 if (!cs->inbuf) {
650 err("out of memory"); 650 pr_err("out of memory\n");
651 goto error; 651 goto error;
652 } 652 }
653 653
@@ -690,7 +690,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
690 for (i = 0; i < channels; ++i) { 690 for (i = 0; i < channels; ++i) {
691 gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i); 691 gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i);
692 if (!gigaset_initbcs(cs->bcs + i, cs, i)) { 692 if (!gigaset_initbcs(cs->bcs + i, cs, i)) {
693 err("could not allocate channel %d data", i); 693 pr_err("could not allocate channel %d data\n", i);
694 goto error; 694 goto error;
695 } 695 }
696 } 696 }
@@ -720,17 +720,15 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
720 720
721 gig_dbg(DEBUG_INIT, "setting up iif"); 721 gig_dbg(DEBUG_INIT, "setting up iif");
722 if (!gigaset_register_to_LL(cs, modulename)) { 722 if (!gigaset_register_to_LL(cs, modulename)) {
723 err("register_isdn failed"); 723 pr_err("error registering ISDN device\n");
724 goto error; 724 goto error;
725 } 725 }
726 726
727 make_valid(cs, VALID_ID); 727 make_valid(cs, VALID_ID);
728 ++cs->cs_init; 728 ++cs->cs_init;
729 gig_dbg(DEBUG_INIT, "setting up hw"); 729 gig_dbg(DEBUG_INIT, "setting up hw");
730 if (!cs->ops->initcshw(cs)) { 730 if (!cs->ops->initcshw(cs))
731 err("could not allocate device specific data");
732 goto error; 731 goto error;
733 }
734 732
735 ++cs->cs_init; 733 ++cs->cs_init;
736 734
@@ -836,7 +834,7 @@ static void cleanup_cs(struct cardstate *cs)
836 for (i = 0; i < cs->channels; ++i) { 834 for (i = 0; i < cs->channels; ++i) {
837 gigaset_freebcs(cs->bcs + i); 835 gigaset_freebcs(cs->bcs + i);
838 if (!gigaset_initbcs(cs->bcs + i, cs, i)) 836 if (!gigaset_initbcs(cs->bcs + i, cs, i))
839 break; //FIXME error handling 837 pr_err("could not allocate channel %d data\n", i);
840 } 838 }
841 839
842 if (cs->waiting) { 840 if (cs->waiting) {
@@ -1120,7 +1118,7 @@ static int __init gigaset_init_module(void)
1120 if (gigaset_debuglevel == 1) 1118 if (gigaset_debuglevel == 1)
1121 gigaset_debuglevel = DEBUG_DEFAULT; 1119 gigaset_debuglevel = DEBUG_DEFAULT;
1122 1120
1123 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); 1121 pr_info(DRIVER_DESC "\n");
1124 return 0; 1122 return 0;
1125} 1123}
1126 1124