diff options
author | Tilman Schmidt <tilman@imap.cc> | 2008-12-26 04:21:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-26 04:21:29 -0500 |
commit | c8770dcabd6a615b155c25dc4d57251d3e7f151c (patch) | |
tree | 3f8bbf9d4f17525440b22bfb702f35a9f7bdf033 /drivers/isdn | |
parent | 4d8cd002602987ddc9507b5390800343f820ac92 (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')
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 12 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 20 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 14 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 26 | ||||
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 16 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 13 |
8 files changed, 51 insertions, 58 deletions
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3eca9c8067f6..18dd8aacbe8d 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -2067,7 +2067,7 @@ static int gigaset_initbcshw(struct bc_state *bcs) | |||
2067 | 2067 | ||
2068 | bcs->hw.bas = ubc = kmalloc(sizeof(struct bas_bc_state), GFP_KERNEL); | 2068 | bcs->hw.bas = ubc = kmalloc(sizeof(struct bas_bc_state), GFP_KERNEL); |
2069 | if (!ubc) { | 2069 | if (!ubc) { |
2070 | err("could not allocate bas_bc_state"); | 2070 | pr_err("out of memory\n"); |
2071 | return 0; | 2071 | return 0; |
2072 | } | 2072 | } |
2073 | 2073 | ||
@@ -2081,7 +2081,7 @@ static int gigaset_initbcshw(struct bc_state *bcs) | |||
2081 | ubc->isooutdone = ubc->isooutfree = ubc->isooutovfl = NULL; | 2081 | ubc->isooutdone = ubc->isooutfree = ubc->isooutovfl = NULL; |
2082 | ubc->numsub = 0; | 2082 | ubc->numsub = 0; |
2083 | if (!(ubc->isooutbuf = kmalloc(sizeof(struct isowbuf_t), GFP_KERNEL))) { | 2083 | if (!(ubc->isooutbuf = kmalloc(sizeof(struct isowbuf_t), GFP_KERNEL))) { |
2084 | err("could not allocate isochronous output buffer"); | 2084 | pr_err("out of memory\n"); |
2085 | kfree(ubc); | 2085 | kfree(ubc); |
2086 | bcs->hw.bas = NULL; | 2086 | bcs->hw.bas = NULL; |
2087 | return 0; | 2087 | return 0; |
@@ -2136,8 +2136,10 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
2136 | struct bas_cardstate *ucs; | 2136 | struct bas_cardstate *ucs; |
2137 | 2137 | ||
2138 | cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); | 2138 | cs->hw.bas = ucs = kmalloc(sizeof *ucs, GFP_KERNEL); |
2139 | if (!ucs) | 2139 | if (!ucs) { |
2140 | pr_err("out of memory\n"); | ||
2140 | return 0; | 2141 | return 0; |
2142 | } | ||
2141 | 2143 | ||
2142 | ucs->urb_cmd_in = NULL; | 2144 | ucs->urb_cmd_in = NULL; |
2143 | ucs->urb_cmd_out = NULL; | 2145 | ucs->urb_cmd_out = NULL; |
@@ -2503,11 +2505,11 @@ static int __init bas_gigaset_init(void) | |||
2503 | /* register this driver with the USB subsystem */ | 2505 | /* register this driver with the USB subsystem */ |
2504 | result = usb_register(&gigaset_usb_driver); | 2506 | result = usb_register(&gigaset_usb_driver); |
2505 | if (result < 0) { | 2507 | if (result < 0) { |
2506 | err("usb_register failed (error %d)", -result); | 2508 | pr_err("error %d registering USB driver\n", -result); |
2507 | goto error; | 2509 | goto error; |
2508 | } | 2510 | } |
2509 | 2511 | ||
2510 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); | 2512 | pr_info(DRIVER_DESC "\n"); |
2511 | return 0; | 2513 | return 0; |
2512 | 2514 | ||
2513 | error: | 2515 | error: |
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 | ||
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 901ff437e700..747178f03d2c 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -16,6 +16,9 @@ | |||
16 | #ifndef GIGASET_H | 16 | #ifndef GIGASET_H |
17 | #define GIGASET_H | 17 | #define GIGASET_H |
18 | 18 | ||
19 | /* define global prefix for pr_ macros in linux/kernel.h */ | ||
20 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
21 | |||
19 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
20 | #include <linux/compiler.h> | 23 | #include <linux/compiler.h> |
21 | #include <linux/types.h> | 24 | #include <linux/types.h> |
@@ -97,17 +100,6 @@ enum debuglevel { | |||
97 | activated */ | 100 | activated */ |
98 | }; | 101 | }; |
99 | 102 | ||
100 | /* Kernel message macros for situations where dev_printk and friends cannot be | ||
101 | * used for lack of reliable access to a device structure. | ||
102 | * linux/usb.h already contains these but in an obsolete form which clutters | ||
103 | * the log needlessly, and according to the USB maintainer those should be | ||
104 | * removed rather than fixed anyway. | ||
105 | */ | ||
106 | #undef err | ||
107 | |||
108 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ | ||
109 | format "\n" , ## arg) | ||
110 | |||
111 | #ifdef CONFIG_GIGASET_DEBUG | 103 | #ifdef CONFIG_GIGASET_DEBUG |
112 | 104 | ||
113 | #define gig_dbg(level, format, arg...) \ | 105 | #define gig_dbg(level, format, arg...) \ |
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 3c127a8cbaf2..69a702f0db93 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -42,7 +42,7 @@ static int writebuf_from_LL(int driverID, int channel, int ack, | |||
42 | unsigned skblen; | 42 | unsigned skblen; |
43 | 43 | ||
44 | if (!(cs = gigaset_get_cs_by_id(driverID))) { | 44 | if (!(cs = gigaset_get_cs_by_id(driverID))) { |
45 | err("%s: invalid driver ID (%d)", __func__, driverID); | 45 | pr_err("%s: invalid driver ID (%d)\n", __func__, driverID); |
46 | return -ENODEV; | 46 | return -ENODEV; |
47 | } | 47 | } |
48 | if (channel < 0 || channel >= cs->channels) { | 48 | if (channel < 0 || channel >= cs->channels) { |
@@ -119,7 +119,7 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
119 | gigaset_debugdrivers(); | 119 | gigaset_debugdrivers(); |
120 | 120 | ||
121 | if (!cs) { | 121 | if (!cs) { |
122 | err("%s: invalid driver ID (%d)", __func__, cntrl->driver); | 122 | pr_err("%s: invalid driver ID (%d)\n", __func__, cntrl->driver); |
123 | return -ENODEV; | 123 | return -ENODEV; |
124 | } | 124 | } |
125 | 125 | ||
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 956381cd2774..94fa84b2c4e7 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -107,7 +107,7 @@ static int if_config(struct cardstate *cs, int *arg) | |||
107 | return -EBUSY; | 107 | return -EBUSY; |
108 | 108 | ||
109 | if (!cs->connected) { | 109 | if (!cs->connected) { |
110 | err("not connected!"); | 110 | pr_err("%s: not connected\n", __func__); |
111 | return -ENODEV; | 111 | return -ENODEV; |
112 | } | 112 | } |
113 | 113 | ||
@@ -188,7 +188,7 @@ static void if_close(struct tty_struct *tty, struct file *filp) | |||
188 | 188 | ||
189 | cs = (struct cardstate *) tty->driver_data; | 189 | cs = (struct cardstate *) tty->driver_data; |
190 | if (!cs) { | 190 | if (!cs) { |
191 | err("cs==NULL in %s", __func__); | 191 | pr_err("%s: no cardstate\n", __func__); |
192 | return; | 192 | return; |
193 | } | 193 | } |
194 | 194 | ||
@@ -222,7 +222,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, | |||
222 | 222 | ||
223 | cs = (struct cardstate *) tty->driver_data; | 223 | cs = (struct cardstate *) tty->driver_data; |
224 | if (!cs) { | 224 | if (!cs) { |
225 | err("cs==NULL in %s", __func__); | 225 | pr_err("%s: no cardstate\n", __func__); |
226 | return -ENODEV; | 226 | return -ENODEV; |
227 | } | 227 | } |
228 | 228 | ||
@@ -297,7 +297,7 @@ static int if_tiocmget(struct tty_struct *tty, struct file *file) | |||
297 | 297 | ||
298 | cs = (struct cardstate *) tty->driver_data; | 298 | cs = (struct cardstate *) tty->driver_data; |
299 | if (!cs) { | 299 | if (!cs) { |
300 | err("cs==NULL in %s", __func__); | 300 | pr_err("%s: no cardstate\n", __func__); |
301 | return -ENODEV; | 301 | return -ENODEV; |
302 | } | 302 | } |
303 | 303 | ||
@@ -323,7 +323,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file, | |||
323 | 323 | ||
324 | cs = (struct cardstate *) tty->driver_data; | 324 | cs = (struct cardstate *) tty->driver_data; |
325 | if (!cs) { | 325 | if (!cs) { |
326 | err("cs==NULL in %s", __func__); | 326 | pr_err("%s: no cardstate\n", __func__); |
327 | return -ENODEV; | 327 | return -ENODEV; |
328 | } | 328 | } |
329 | 329 | ||
@@ -354,7 +354,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) | |||
354 | 354 | ||
355 | cs = (struct cardstate *) tty->driver_data; | 355 | cs = (struct cardstate *) tty->driver_data; |
356 | if (!cs) { | 356 | if (!cs) { |
357 | err("cs==NULL in %s", __func__); | 357 | pr_err("%s: no cardstate\n", __func__); |
358 | return -ENODEV; | 358 | return -ENODEV; |
359 | } | 359 | } |
360 | 360 | ||
@@ -388,7 +388,7 @@ static int if_write_room(struct tty_struct *tty) | |||
388 | 388 | ||
389 | cs = (struct cardstate *) tty->driver_data; | 389 | cs = (struct cardstate *) tty->driver_data; |
390 | if (!cs) { | 390 | if (!cs) { |
391 | err("cs==NULL in %s", __func__); | 391 | pr_err("%s: no cardstate\n", __func__); |
392 | return -ENODEV; | 392 | return -ENODEV; |
393 | } | 393 | } |
394 | 394 | ||
@@ -420,7 +420,7 @@ static int if_chars_in_buffer(struct tty_struct *tty) | |||
420 | 420 | ||
421 | cs = (struct cardstate *) tty->driver_data; | 421 | cs = (struct cardstate *) tty->driver_data; |
422 | if (!cs) { | 422 | if (!cs) { |
423 | err("cs==NULL in %s", __func__); | 423 | pr_err("%s: no cardstate\n", __func__); |
424 | return -ENODEV; | 424 | return -ENODEV; |
425 | } | 425 | } |
426 | 426 | ||
@@ -451,7 +451,7 @@ static void if_throttle(struct tty_struct *tty) | |||
451 | 451 | ||
452 | cs = (struct cardstate *) tty->driver_data; | 452 | cs = (struct cardstate *) tty->driver_data; |
453 | if (!cs) { | 453 | if (!cs) { |
454 | err("cs==NULL in %s", __func__); | 454 | pr_err("%s: no cardstate\n", __func__); |
455 | return; | 455 | return; |
456 | } | 456 | } |
457 | 457 | ||
@@ -474,7 +474,7 @@ static void if_unthrottle(struct tty_struct *tty) | |||
474 | 474 | ||
475 | cs = (struct cardstate *) tty->driver_data; | 475 | cs = (struct cardstate *) tty->driver_data; |
476 | if (!cs) { | 476 | if (!cs) { |
477 | err("cs==NULL in %s", __func__); | 477 | pr_err("%s: no cardstate\n", __func__); |
478 | return; | 478 | return; |
479 | } | 479 | } |
480 | 480 | ||
@@ -501,7 +501,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
501 | 501 | ||
502 | cs = (struct cardstate *) tty->driver_data; | 502 | cs = (struct cardstate *) tty->driver_data; |
503 | if (!cs) { | 503 | if (!cs) { |
504 | err("cs==NULL in %s", __func__); | 504 | pr_err("%s: no cardstate\n", __func__); |
505 | return; | 505 | return; |
506 | } | 506 | } |
507 | 507 | ||
@@ -701,7 +701,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, | |||
701 | 701 | ||
702 | ret = tty_register_driver(tty); | 702 | ret = tty_register_driver(tty); |
703 | if (ret < 0) { | 703 | if (ret < 0) { |
704 | err("failed to register tty driver (error %d)", ret); | 704 | pr_err("error %d registering tty driver\n", ret); |
705 | goto error; | 705 | goto error; |
706 | } | 706 | } |
707 | gig_dbg(DEBUG_IF, "tty driver initialized"); | 707 | gig_dbg(DEBUG_IF, "tty driver initialized"); |
@@ -709,7 +709,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, | |||
709 | return; | 709 | return; |
710 | 710 | ||
711 | enomem: | 711 | enomem: |
712 | err("could not allocate tty structures"); | 712 | pr_err("out of memory\n"); |
713 | error: | 713 | error: |
714 | if (drv->tty) | 714 | if (drv->tty) |
715 | put_tty_driver(drv->tty); | 715 | put_tty_driver(drv->tty); |
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index fbce5222d83c..4b8b58503854 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
@@ -173,13 +173,13 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size) | |||
173 | __func__, read, write, limit); | 173 | __func__, read, write, limit); |
174 | #ifdef CONFIG_GIGASET_DEBUG | 174 | #ifdef CONFIG_GIGASET_DEBUG |
175 | if (unlikely(size < 0 || size > BAS_OUTBUFPAD)) { | 175 | if (unlikely(size < 0 || size > BAS_OUTBUFPAD)) { |
176 | err("invalid size %d", size); | 176 | pr_err("invalid size %d\n", size); |
177 | return -EINVAL; | 177 | return -EINVAL; |
178 | } | 178 | } |
179 | src = iwb->read; | 179 | src = iwb->read; |
180 | if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || | 180 | if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || |
181 | (read < src && limit >= src))) { | 181 | (read < src && limit >= src))) { |
182 | err("isoc write buffer frame reservation violated"); | 182 | pr_err("isoc write buffer frame reservation violated\n"); |
183 | return -EFAULT; | 183 | return -EFAULT; |
184 | } | 184 | } |
185 | #endif | 185 | #endif |
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index b306a2ff7312..ac245e7e96a5 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -407,7 +407,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
407 | int rc; | 407 | int rc; |
408 | 408 | ||
409 | if (!(cs->hw.ser = kzalloc(sizeof(struct ser_cardstate), GFP_KERNEL))) { | 409 | if (!(cs->hw.ser = kzalloc(sizeof(struct ser_cardstate), GFP_KERNEL))) { |
410 | err("%s: out of memory!", __func__); | 410 | pr_err("out of memory\n"); |
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
413 | 413 | ||
@@ -415,7 +415,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
415 | cs->hw.ser->dev.id = cs->minor_index; | 415 | cs->hw.ser->dev.id = cs->minor_index; |
416 | cs->hw.ser->dev.dev.release = gigaset_device_release; | 416 | cs->hw.ser->dev.dev.release = gigaset_device_release; |
417 | if ((rc = platform_device_register(&cs->hw.ser->dev)) != 0) { | 417 | if ((rc = platform_device_register(&cs->hw.ser->dev)) != 0) { |
418 | err("error %d registering platform device", rc); | 418 | pr_err("error %d registering platform device\n", rc); |
419 | kfree(cs->hw.ser); | 419 | kfree(cs->hw.ser); |
420 | cs->hw.ser = NULL; | 420 | cs->hw.ser = NULL; |
421 | return 0; | 421 | return 0; |
@@ -513,10 +513,10 @@ gigaset_tty_open(struct tty_struct *tty) | |||
513 | 513 | ||
514 | gig_dbg(DEBUG_INIT, "Starting HLL for Gigaset M101"); | 514 | gig_dbg(DEBUG_INIT, "Starting HLL for Gigaset M101"); |
515 | 515 | ||
516 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); | 516 | pr_info(DRIVER_DESC "\n"); |
517 | 517 | ||
518 | if (!driver) { | 518 | if (!driver) { |
519 | err("%s: no driver structure", __func__); | 519 | pr_err("%s: no driver structure\n", __func__); |
520 | return -ENODEV; | 520 | return -ENODEV; |
521 | } | 521 | } |
522 | 522 | ||
@@ -572,7 +572,7 @@ gigaset_tty_close(struct tty_struct *tty) | |||
572 | tty->disc_data = NULL; | 572 | tty->disc_data = NULL; |
573 | 573 | ||
574 | if (!cs->hw.ser) | 574 | if (!cs->hw.ser) |
575 | err("%s: no hw cardstate", __func__); | 575 | pr_err("%s: no hw cardstate\n", __func__); |
576 | else { | 576 | else { |
577 | /* wait for running methods to finish */ | 577 | /* wait for running methods to finish */ |
578 | if (!atomic_dec_and_test(&cs->hw.ser->refcnt)) | 578 | if (!atomic_dec_and_test(&cs->hw.ser->refcnt)) |
@@ -772,7 +772,7 @@ static int __init ser_gigaset_init(void) | |||
772 | 772 | ||
773 | gig_dbg(DEBUG_INIT, "%s", __func__); | 773 | gig_dbg(DEBUG_INIT, "%s", __func__); |
774 | if ((rc = platform_driver_register(&device_driver)) != 0) { | 774 | if ((rc = platform_driver_register(&device_driver)) != 0) { |
775 | err("error %d registering platform driver", rc); | 775 | pr_err("error %d registering platform driver\n", rc); |
776 | return rc; | 776 | return rc; |
777 | } | 777 | } |
778 | 778 | ||
@@ -783,7 +783,7 @@ static int __init ser_gigaset_init(void) | |||
783 | goto error; | 783 | goto error; |
784 | 784 | ||
785 | if ((rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc)) != 0) { | 785 | if ((rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc)) != 0) { |
786 | err("error %d registering line discipline", rc); | 786 | pr_err("error %d registering line discipline\n", rc); |
787 | goto error; | 787 | goto error; |
788 | } | 788 | } |
789 | 789 | ||
@@ -810,7 +810,7 @@ static void __exit ser_gigaset_exit(void) | |||
810 | } | 810 | } |
811 | 811 | ||
812 | if ((rc = tty_unregister_ldisc(N_GIGASET_M101)) != 0) | 812 | if ((rc = tty_unregister_ldisc(N_GIGASET_M101)) != 0) |
813 | err("error %d unregistering line discipline", rc); | 813 | pr_err("error %d unregistering line discipline\n", rc); |
814 | 814 | ||
815 | platform_driver_unregister(&device_driver); | 815 | platform_driver_unregister(&device_driver); |
816 | } | 816 | } |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index e847c6e6d3fd..fba61f670527 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -407,7 +407,7 @@ static void gigaset_read_int_callback(struct urb *urb) | |||
407 | spin_lock_irqsave(&cs->lock, flags); | 407 | spin_lock_irqsave(&cs->lock, flags); |
408 | if (!cs->connected) { | 408 | if (!cs->connected) { |
409 | spin_unlock_irqrestore(&cs->lock, flags); | 409 | spin_unlock_irqrestore(&cs->lock, flags); |
410 | err("%s: disconnected", __func__); | 410 | pr_err("%s: disconnected\n", __func__); |
411 | return; | 411 | return; |
412 | } | 412 | } |
413 | r = usb_submit_urb(urb, GFP_ATOMIC); | 413 | r = usb_submit_urb(urb, GFP_ATOMIC); |
@@ -440,7 +440,7 @@ static void gigaset_write_bulk_callback(struct urb *urb) | |||
440 | 440 | ||
441 | spin_lock_irqsave(&cs->lock, flags); | 441 | spin_lock_irqsave(&cs->lock, flags); |
442 | if (!cs->connected) { | 442 | if (!cs->connected) { |
443 | err("%s: not connected", __func__); | 443 | pr_err("%s: disconnected\n", __func__); |
444 | } else { | 444 | } else { |
445 | cs->hw.usb->busy = 0; | 445 | cs->hw.usb->busy = 0; |
446 | tasklet_schedule(&cs->write_tasklet); | 446 | tasklet_schedule(&cs->write_tasklet); |
@@ -612,8 +612,10 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
612 | 612 | ||
613 | cs->hw.usb = ucs = | 613 | cs->hw.usb = ucs = |
614 | kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL); | 614 | kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL); |
615 | if (!ucs) | 615 | if (!ucs) { |
616 | pr_err("out of memory\n"); | ||
616 | return 0; | 617 | return 0; |
618 | } | ||
617 | 619 | ||
618 | ucs->bchars[0] = 0; | 620 | ucs->bchars[0] = 0; |
619 | ucs->bchars[1] = 0; | 621 | ucs->bchars[1] = 0; |
@@ -936,12 +938,11 @@ static int __init usb_gigaset_init(void) | |||
936 | /* register this driver with the USB subsystem */ | 938 | /* register this driver with the USB subsystem */ |
937 | result = usb_register(&gigaset_usb_driver); | 939 | result = usb_register(&gigaset_usb_driver); |
938 | if (result < 0) { | 940 | if (result < 0) { |
939 | err("usb_gigaset: usb_register failed (error %d)", | 941 | pr_err("error %d registering USB driver\n", -result); |
940 | -result); | ||
941 | goto error; | 942 | goto error; |
942 | } | 943 | } |
943 | 944 | ||
944 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "\n"); | 945 | pr_info(DRIVER_DESC "\n"); |
945 | return 0; | 946 | return 0; |
946 | 947 | ||
947 | error: | 948 | error: |