diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 15:49:40 -0500 |
commit | 0191b625ca5a46206d2fb862bb08f36f2fcb3b31 (patch) | |
tree | 454d1842b1833d976da62abcbd5c47521ebe9bd7 /drivers/isdn/gigaset | |
parent | 54a696bd07c14d3b1192d03ce7269bc59b45209a (diff) | |
parent | eb56092fc168bf5af199d47af50c0d84a96db898 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
net: Allow dependancies of FDDI & Tokenring to be modular.
igb: Fix build warning when DCA is disabled.
net: Fix warning fallout from recent NAPI interface changes.
gro: Fix potential use after free
sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
sfc: When disabling the NIC, close the device rather than unregistering it
sfc: SFT9001: Add cable diagnostics
sfc: Add support for multiple PHY self-tests
sfc: Merge top-level functions for self-tests
sfc: Clean up PHY mode management in loopback self-test
sfc: Fix unreliable link detection in some loopback modes
sfc: Generate unique names for per-NIC workqueues
802.3ad: use standard ethhdr instead of ad_header
802.3ad: generalize out mac address initializer
802.3ad: initialize ports LACPDU from const initializer
802.3ad: remove typedef around ad_system
802.3ad: turn ports is_individual into a bool
802.3ad: turn ports is_enabled into a bool
802.3ad: make ntt bool
ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
...
Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 18 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 13 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 21 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 42 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 20 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 52 | ||||
-rw-r--r-- | drivers/isdn/gigaset/isocdata.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ser-gigaset.c | 32 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 14 |
10 files changed, 57 insertions, 165 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index c2bd97d29273..2a4ce96f04bd 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -17,8 +17,6 @@ | |||
17 | #include <linux/crc-ccitt.h> | 17 | #include <linux/crc-ccitt.h> |
18 | #include <linux/bitrev.h> | 18 | #include <linux/bitrev.h> |
19 | 19 | ||
20 | //#define GIG_M10x_STUFF_VOICE_DATA | ||
21 | |||
22 | /* check if byte must be stuffed/escaped | 20 | /* check if byte must be stuffed/escaped |
23 | * I'm not sure which data should be encoded. | 21 | * I'm not sure which data should be encoded. |
24 | * Therefore I will go the hard way and decode every value | 22 | * Therefore I will go the hard way and decode every value |
@@ -147,19 +145,17 @@ static inline int hdlc_loop(unsigned char c, unsigned char *src, int numbytes, | |||
147 | } | 145 | } |
148 | byte_stuff: | 146 | byte_stuff: |
149 | c ^= PPP_TRANS; | 147 | c ^= PPP_TRANS; |
150 | #ifdef CONFIG_GIGASET_DEBUG | ||
151 | if (unlikely(!muststuff(c))) | 148 | if (unlikely(!muststuff(c))) |
152 | gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c); | 149 | gig_dbg(DEBUG_HDLC, "byte stuffed: 0x%02x", c); |
153 | #endif | ||
154 | } else if (unlikely(c == PPP_FLAG)) { | 150 | } else if (unlikely(c == PPP_FLAG)) { |
155 | if (unlikely(inputstate & INS_skip_frame)) { | 151 | if (unlikely(inputstate & INS_skip_frame)) { |
156 | if (!(inputstate & INS_have_data)) { /* 7E 7E */ | ||
157 | #ifdef CONFIG_GIGASET_DEBUG | 152 | #ifdef CONFIG_GIGASET_DEBUG |
153 | if (!(inputstate & INS_have_data)) { /* 7E 7E */ | ||
158 | ++bcs->emptycount; | 154 | ++bcs->emptycount; |
159 | #endif | ||
160 | } else | 155 | } else |
161 | gig_dbg(DEBUG_HDLC, | 156 | gig_dbg(DEBUG_HDLC, |
162 | "7e----------------------------"); | 157 | "7e----------------------------"); |
158 | #endif | ||
163 | 159 | ||
164 | /* end of frame */ | 160 | /* end of frame */ |
165 | error = 1; | 161 | error = 1; |
@@ -226,11 +222,9 @@ byte_stuff: | |||
226 | } | 222 | } |
227 | 223 | ||
228 | break; | 224 | break; |
229 | #ifdef CONFIG_GIGASET_DEBUG | ||
230 | } else if (unlikely(muststuff(c))) { | 225 | } else if (unlikely(muststuff(c))) { |
231 | /* Should not happen. Possible after ZDLE=1<CR><LF>. */ | 226 | /* Should not happen. Possible after ZDLE=1<CR><LF>. */ |
232 | gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c); | 227 | gig_dbg(DEBUG_HDLC, "not byte stuffed: 0x%02x", c); |
233 | #endif | ||
234 | } | 228 | } |
235 | 229 | ||
236 | /* add character */ | 230 | /* add character */ |
@@ -394,20 +388,16 @@ void gigaset_m10x_input(struct inbuf_t *inbuf) | |||
394 | inbuf->inputstate &= ~INS_DLE_char; | 388 | inbuf->inputstate &= ~INS_DLE_char; |
395 | switch (c) { | 389 | switch (c) { |
396 | case 'X': /*begin of command*/ | 390 | case 'X': /*begin of command*/ |
397 | #ifdef CONFIG_GIGASET_DEBUG | ||
398 | if (inbuf->inputstate & INS_command) | 391 | if (inbuf->inputstate & INS_command) |
399 | dev_err(cs->dev, | 392 | dev_warn(cs->dev, |
400 | "received <DLE> 'X' in command mode\n"); | 393 | "received <DLE> 'X' in command mode\n"); |
401 | #endif | ||
402 | inbuf->inputstate |= | 394 | inbuf->inputstate |= |
403 | INS_command | INS_DLE_command; | 395 | INS_command | INS_DLE_command; |
404 | break; | 396 | break; |
405 | case '.': /*end of command*/ | 397 | case '.': /*end of command*/ |
406 | #ifdef CONFIG_GIGASET_DEBUG | ||
407 | if (!(inbuf->inputstate & INS_command)) | 398 | if (!(inbuf->inputstate & INS_command)) |
408 | dev_err(cs->dev, | 399 | dev_warn(cs->dev, |
409 | "received <DLE> '.' in hdlc mode\n"); | 400 | "received <DLE> '.' in hdlc mode\n"); |
410 | #endif | ||
411 | inbuf->inputstate &= cs->dle ? | 401 | inbuf->inputstate &= cs->dle ? |
412 | ~(INS_DLE_command|INS_command) | 402 | ~(INS_DLE_command|INS_command) |
413 | : ~INS_DLE_command; | 403 | : ~INS_DLE_command; |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 3f11910c7ccd..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,12 +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 | info(DRIVER_AUTHOR); | 2512 | pr_info(DRIVER_DESC "\n"); |
2511 | info(DRIVER_DESC); | ||
2512 | return 0; | 2513 | return 0; |
2513 | 2514 | ||
2514 | error: | 2515 | error: |
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index 9d3ce7718e58..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 | warn("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,8 +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 | info(DRIVER_AUTHOR); | 1121 | pr_info(DRIVER_DESC "\n"); |
1124 | info(DRIVER_DESC); | ||
1125 | return 0; | 1122 | return 0; |
1126 | } | 1123 | } |
1127 | 1124 | ||
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 5cbf64d850ee..e582a4887bc1 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -203,15 +203,6 @@ struct reply_t gigaset_tab_nocid_m10x[]= /* with dle mode */ | |||
203 | {EV_TIMEOUT, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, | 203 | {EV_TIMEOUT, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, |
204 | {RSP_ERROR, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, | 204 | {RSP_ERROR, 120,121, -1, 0, 0, {ACT_FAILVER, ACT_INIT}}, |
205 | {RSP_OK, 121,121, -1, 0, 0, {ACT_GOTVER, ACT_INIT}}, | 205 | {RSP_OK, 121,121, -1, 0, 0, {ACT_GOTVER, ACT_INIT}}, |
206 | #if 0 | ||
207 | {EV_TIMEOUT, 120,121, -1, 130, 5, {ACT_FAILVER}, "^SGCI=1\r"}, | ||
208 | {RSP_ERROR, 120,121, -1, 130, 5, {ACT_FAILVER}, "^SGCI=1\r"}, | ||
209 | {RSP_OK, 121,121, -1, 130, 5, {ACT_GOTVER}, "^SGCI=1\r"}, | ||
210 | |||
211 | {RSP_OK, 130,130, -1, 0, 0, {ACT_INIT}}, | ||
212 | {RSP_ERROR, 130,130, -1, 0, 0, {ACT_FAILINIT}}, | ||
213 | {EV_TIMEOUT, 130,130, -1, 0, 0, {ACT_FAILINIT}}, | ||
214 | #endif | ||
215 | 206 | ||
216 | /* leave dle mode */ | 207 | /* leave dle mode */ |
217 | {RSP_INIT, 0, 0,SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, | 208 | {RSP_INIT, 0, 0,SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, |
@@ -260,10 +251,6 @@ struct reply_t gigaset_tab_nocid_m10x[]= /* with dle mode */ | |||
260 | {RSP_INIT, 0, 0,SEQ_NOCID, 0, 0, {ACT_ABORTCID}}, | 251 | {RSP_INIT, 0, 0,SEQ_NOCID, 0, 0, {ACT_ABORTCID}}, |
261 | 252 | ||
262 | /* reset */ | 253 | /* reset */ |
263 | #if 0 | ||
264 | {RSP_INIT, 0, 0,SEQ_SHUTDOWN, 503, 5, {0}, "^SGCI=0\r"}, | ||
265 | {RSP_OK, 503,503, -1, 504, 5, {0}, "Z\r"}, | ||
266 | #endif | ||
267 | {RSP_INIT, 0, 0,SEQ_SHUTDOWN, 504, 5, {0}, "Z\r"}, | 254 | {RSP_INIT, 0, 0,SEQ_SHUTDOWN, 504, 5, {0}, "Z\r"}, |
268 | {RSP_OK, 504,504, -1, 0, 0, {ACT_SDOWN}}, | 255 | {RSP_OK, 504,504, -1, 0, 0, {ACT_SDOWN}}, |
269 | {RSP_ERROR, 501,599, -1, 0, 0, {ACT_FAILSDOWN}}, | 256 | {RSP_ERROR, 501,599, -1, 0, 0, {ACT_FAILSDOWN}}, |
@@ -391,24 +378,6 @@ struct reply_t gigaset_tab_cid_m10x[] = /* for M10x */ | |||
391 | }; | 378 | }; |
392 | 379 | ||
393 | 380 | ||
394 | #if 0 | ||
395 | static struct reply_t tab_nocid[]= /* no dle mode */ //FIXME | ||
396 | { | ||
397 | /* resp_code, min_ConState, max_ConState, parameter, new_ConState, timeout, action, command */ | ||
398 | |||
399 | {RSP_ANY, -1, -1, -1, -1,-1, ACT_WARN, NULL}, | ||
400 | {RSP_LAST,0,0,0,0,0,0} | ||
401 | }; | ||
402 | |||
403 | static struct reply_t tab_cid[] = /* no dle mode */ //FIXME | ||
404 | { | ||
405 | /* resp_code, min_ConState, max_ConState, parameter, new_ConState, timeout, action, command */ | ||
406 | |||
407 | {RSP_ANY, -1, -1, -1, -1,-1, ACT_WARN, NULL}, | ||
408 | {RSP_LAST,0,0,0,0,0,0} | ||
409 | }; | ||
410 | #endif | ||
411 | |||
412 | static const struct resp_type_t resp_type[] = | 381 | static const struct resp_type_t resp_type[] = |
413 | { | 382 | { |
414 | /*{"", RSP_EMPTY, RT_NOTHING},*/ | 383 | /*{"", RSP_EMPTY, RT_NOTHING},*/ |
@@ -665,13 +634,8 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
665 | dev_err(cs->dev, "out of memory\n"); | 634 | dev_err(cs->dev, "out of memory\n"); |
666 | ++curarg; | 635 | ++curarg; |
667 | } | 636 | } |
668 | #ifdef CONFIG_GIGASET_DEBUG | 637 | gig_dbg(DEBUG_CMD, "string==%s", |
669 | if (!event->ptr) | 638 | event->ptr ? (char *) event->ptr : "NULL"); |
670 | gig_dbg(DEBUG_CMD, "string==NULL"); | ||
671 | else | ||
672 | gig_dbg(DEBUG_CMD, "string==%s", | ||
673 | (char *) event->ptr); | ||
674 | #endif | ||
675 | break; | 639 | break; |
676 | case RT_ZCAU: | 640 | case RT_ZCAU: |
677 | event->parameter = -1; | 641 | event->parameter = -1; |
@@ -697,9 +661,7 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
697 | ++curarg; | 661 | ++curarg; |
698 | } else | 662 | } else |
699 | event->parameter = -1; | 663 | event->parameter = -1; |
700 | #ifdef CONFIG_GIGASET_DEBUG | ||
701 | gig_dbg(DEBUG_CMD, "parameter==%d", event->parameter); | 664 | gig_dbg(DEBUG_CMD, "parameter==%d", event->parameter); |
702 | #endif | ||
703 | break; | 665 | break; |
704 | } | 666 | } |
705 | 667 | ||
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 003752954993..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,23 +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 | #undef info | ||
108 | #undef warn | ||
109 | |||
110 | #define err(format, arg...) printk(KERN_ERR KBUILD_MODNAME ": " \ | ||
111 | format "\n" , ## arg) | ||
112 | #define info(format, arg...) printk(KERN_INFO KBUILD_MODNAME ": " \ | ||
113 | format "\n" , ## arg) | ||
114 | #define warn(format, arg...) printk(KERN_WARNING KBUILD_MODNAME ": " \ | ||
115 | format "\n" , ## arg) | ||
116 | |||
117 | #ifdef CONFIG_GIGASET_DEBUG | 103 | #ifdef CONFIG_GIGASET_DEBUG |
118 | 104 | ||
119 | #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 521951a898ec..311e7ca0fb01 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 | ||
@@ -143,9 +143,6 @@ static const struct tty_operations if_ops = { | |||
143 | .set_termios = if_set_termios, | 143 | .set_termios = if_set_termios, |
144 | .throttle = if_throttle, | 144 | .throttle = if_throttle, |
145 | .unthrottle = if_unthrottle, | 145 | .unthrottle = if_unthrottle, |
146 | #if 0 | ||
147 | .break_ctl = serial_break, | ||
148 | #endif | ||
149 | .tiocmget = if_tiocmget, | 146 | .tiocmget = if_tiocmget, |
150 | .tiocmset = if_tiocmset, | 147 | .tiocmset = if_tiocmset, |
151 | }; | 148 | }; |
@@ -188,7 +185,7 @@ static void if_close(struct tty_struct *tty, struct file *filp) | |||
188 | 185 | ||
189 | cs = (struct cardstate *) tty->driver_data; | 186 | cs = (struct cardstate *) tty->driver_data; |
190 | if (!cs) { | 187 | if (!cs) { |
191 | err("cs==NULL in %s", __func__); | 188 | pr_err("%s: no cardstate\n", __func__); |
192 | return; | 189 | return; |
193 | } | 190 | } |
194 | 191 | ||
@@ -222,7 +219,7 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, | |||
222 | 219 | ||
223 | cs = (struct cardstate *) tty->driver_data; | 220 | cs = (struct cardstate *) tty->driver_data; |
224 | if (!cs) { | 221 | if (!cs) { |
225 | err("cs==NULL in %s", __func__); | 222 | pr_err("%s: no cardstate\n", __func__); |
226 | return -ENODEV; | 223 | return -ENODEV; |
227 | } | 224 | } |
228 | 225 | ||
@@ -297,7 +294,7 @@ static int if_tiocmget(struct tty_struct *tty, struct file *file) | |||
297 | 294 | ||
298 | cs = (struct cardstate *) tty->driver_data; | 295 | cs = (struct cardstate *) tty->driver_data; |
299 | if (!cs) { | 296 | if (!cs) { |
300 | err("cs==NULL in %s", __func__); | 297 | pr_err("%s: no cardstate\n", __func__); |
301 | return -ENODEV; | 298 | return -ENODEV; |
302 | } | 299 | } |
303 | 300 | ||
@@ -323,7 +320,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file, | |||
323 | 320 | ||
324 | cs = (struct cardstate *) tty->driver_data; | 321 | cs = (struct cardstate *) tty->driver_data; |
325 | if (!cs) { | 322 | if (!cs) { |
326 | err("cs==NULL in %s", __func__); | 323 | pr_err("%s: no cardstate\n", __func__); |
327 | return -ENODEV; | 324 | return -ENODEV; |
328 | } | 325 | } |
329 | 326 | ||
@@ -354,7 +351,7 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) | |||
354 | 351 | ||
355 | cs = (struct cardstate *) tty->driver_data; | 352 | cs = (struct cardstate *) tty->driver_data; |
356 | if (!cs) { | 353 | if (!cs) { |
357 | err("cs==NULL in %s", __func__); | 354 | pr_err("%s: no cardstate\n", __func__); |
358 | return -ENODEV; | 355 | return -ENODEV; |
359 | } | 356 | } |
360 | 357 | ||
@@ -388,7 +385,7 @@ static int if_write_room(struct tty_struct *tty) | |||
388 | 385 | ||
389 | cs = (struct cardstate *) tty->driver_data; | 386 | cs = (struct cardstate *) tty->driver_data; |
390 | if (!cs) { | 387 | if (!cs) { |
391 | err("cs==NULL in %s", __func__); | 388 | pr_err("%s: no cardstate\n", __func__); |
392 | return -ENODEV; | 389 | return -ENODEV; |
393 | } | 390 | } |
394 | 391 | ||
@@ -420,7 +417,7 @@ static int if_chars_in_buffer(struct tty_struct *tty) | |||
420 | 417 | ||
421 | cs = (struct cardstate *) tty->driver_data; | 418 | cs = (struct cardstate *) tty->driver_data; |
422 | if (!cs) { | 419 | if (!cs) { |
423 | err("cs==NULL in %s", __func__); | 420 | pr_err("%s: no cardstate\n", __func__); |
424 | return -ENODEV; | 421 | return -ENODEV; |
425 | } | 422 | } |
426 | 423 | ||
@@ -451,7 +448,7 @@ static void if_throttle(struct tty_struct *tty) | |||
451 | 448 | ||
452 | cs = (struct cardstate *) tty->driver_data; | 449 | cs = (struct cardstate *) tty->driver_data; |
453 | if (!cs) { | 450 | if (!cs) { |
454 | err("cs==NULL in %s", __func__); | 451 | pr_err("%s: no cardstate\n", __func__); |
455 | return; | 452 | return; |
456 | } | 453 | } |
457 | 454 | ||
@@ -474,7 +471,7 @@ static void if_unthrottle(struct tty_struct *tty) | |||
474 | 471 | ||
475 | cs = (struct cardstate *) tty->driver_data; | 472 | cs = (struct cardstate *) tty->driver_data; |
476 | if (!cs) { | 473 | if (!cs) { |
477 | err("cs==NULL in %s", __func__); | 474 | pr_err("%s: no cardstate\n", __func__); |
478 | return; | 475 | return; |
479 | } | 476 | } |
480 | 477 | ||
@@ -501,7 +498,7 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
501 | 498 | ||
502 | cs = (struct cardstate *) tty->driver_data; | 499 | cs = (struct cardstate *) tty->driver_data; |
503 | if (!cs) { | 500 | if (!cs) { |
504 | err("cs==NULL in %s", __func__); | 501 | pr_err("%s: no cardstate\n", __func__); |
505 | return; | 502 | return; |
506 | } | 503 | } |
507 | 504 | ||
@@ -565,29 +562,6 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) | |||
565 | 562 | ||
566 | cs->ops->set_line_ctrl(cs, cflag); | 563 | cs->ops->set_line_ctrl(cs, cflag); |
567 | 564 | ||
568 | #if 0 | ||
569 | //FIXME this hangs M101 [ts 2005-03-09] | ||
570 | //FIXME do we need this? | ||
571 | /* | ||
572 | * Set flow control: well, I do not really now how to handle DTR/RTS. | ||
573 | * Just do what we have seen with SniffUSB on Win98. | ||
574 | */ | ||
575 | /* Drop DTR/RTS if no flow control otherwise assert */ | ||
576 | gig_dbg(DEBUG_IF, "%u: control_state %x", | ||
577 | cs->minor_index, control_state); | ||
578 | new_state = control_state; | ||
579 | if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS)) | ||
580 | new_state |= TIOCM_DTR | TIOCM_RTS; | ||
581 | else | ||
582 | new_state &= ~(TIOCM_DTR | TIOCM_RTS); | ||
583 | if (new_state != control_state) { | ||
584 | gig_dbg(DEBUG_IF, "%u: new_state %x", | ||
585 | cs->minor_index, new_state); | ||
586 | gigaset_set_modem_ctrl(cs, control_state, new_state); | ||
587 | control_state = new_state; | ||
588 | } | ||
589 | #endif | ||
590 | |||
591 | /* save off the modified port settings */ | 565 | /* save off the modified port settings */ |
592 | cs->control_state = control_state; | 566 | cs->control_state = control_state; |
593 | 567 | ||
@@ -701,7 +675,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, | |||
701 | 675 | ||
702 | ret = tty_register_driver(tty); | 676 | ret = tty_register_driver(tty); |
703 | if (ret < 0) { | 677 | if (ret < 0) { |
704 | warn("failed to register tty driver (error %d)", ret); | 678 | pr_err("error %d registering tty driver\n", ret); |
705 | goto error; | 679 | goto error; |
706 | } | 680 | } |
707 | gig_dbg(DEBUG_IF, "tty driver initialized"); | 681 | gig_dbg(DEBUG_IF, "tty driver initialized"); |
@@ -709,7 +683,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, | |||
709 | return; | 683 | return; |
710 | 684 | ||
711 | enomem: | 685 | enomem: |
712 | warn("could not allocate tty structures"); | 686 | pr_err("out of memory\n"); |
713 | error: | 687 | error: |
714 | if (drv->tty) | 688 | if (drv->tty) |
715 | put_tty_driver(drv->tty); | 689 | put_tty_driver(drv->tty); |
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c index fbce5222d83c..b171e75cb52e 100644 --- a/drivers/isdn/gigaset/isocdata.c +++ b/drivers/isdn/gigaset/isocdata.c | |||
@@ -88,11 +88,9 @@ static inline int isowbuf_startwrite(struct isowbuf_t *iwb) | |||
88 | __func__); | 88 | __func__); |
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | #ifdef CONFIG_GIGASET_DEBUG | ||
92 | gig_dbg(DEBUG_ISO, | 91 | gig_dbg(DEBUG_ISO, |
93 | "%s: acquired iso write semaphore, data[write]=%02x, nbits=%d", | 92 | "%s: acquired iso write semaphore, data[write]=%02x, nbits=%d", |
94 | __func__, iwb->data[iwb->write], iwb->wbits); | 93 | __func__, iwb->data[iwb->write], iwb->wbits); |
95 | #endif | ||
96 | return 1; | 94 | return 1; |
97 | } | 95 | } |
98 | 96 | ||
@@ -173,13 +171,13 @@ int gigaset_isowbuf_getbytes(struct isowbuf_t *iwb, int size) | |||
173 | __func__, read, write, limit); | 171 | __func__, read, write, limit); |
174 | #ifdef CONFIG_GIGASET_DEBUG | 172 | #ifdef CONFIG_GIGASET_DEBUG |
175 | if (unlikely(size < 0 || size > BAS_OUTBUFPAD)) { | 173 | if (unlikely(size < 0 || size > BAS_OUTBUFPAD)) { |
176 | err("invalid size %d", size); | 174 | pr_err("invalid size %d\n", size); |
177 | return -EINVAL; | 175 | return -EINVAL; |
178 | } | 176 | } |
179 | src = iwb->read; | 177 | src = iwb->read; |
180 | if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || | 178 | if (unlikely(limit > BAS_OUTBUFSIZE + BAS_OUTBUFPAD || |
181 | (read < src && limit >= src))) { | 179 | (read < src && limit >= src))) { |
182 | err("isoc write buffer frame reservation violated"); | 180 | pr_err("isoc write buffer frame reservation violated\n"); |
183 | return -EFAULT; | 181 | return -EFAULT; |
184 | } | 182 | } |
185 | #endif | 183 | #endif |
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/isdn/gigaset/ser-gigaset.c index 07052ed2a0c5..ac245e7e96a5 100644 --- a/drivers/isdn/gigaset/ser-gigaset.c +++ b/drivers/isdn/gigaset/ser-gigaset.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/moduleparam.h> | 16 | #include <linux/moduleparam.h> |
17 | #include <linux/platform_device.h> | 17 | #include <linux/platform_device.h> |
18 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
19 | #include <linux/poll.h> | ||
20 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
21 | 20 | ||
22 | /* Version Information */ | 21 | /* Version Information */ |
@@ -408,7 +407,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
408 | int rc; | 407 | int rc; |
409 | 408 | ||
410 | if (!(cs->hw.ser = kzalloc(sizeof(struct ser_cardstate), GFP_KERNEL))) { | 409 | if (!(cs->hw.ser = kzalloc(sizeof(struct ser_cardstate), GFP_KERNEL))) { |
411 | err("%s: out of memory!", __func__); | 410 | pr_err("out of memory\n"); |
412 | return 0; | 411 | return 0; |
413 | } | 412 | } |
414 | 413 | ||
@@ -416,7 +415,7 @@ static int gigaset_initcshw(struct cardstate *cs) | |||
416 | cs->hw.ser->dev.id = cs->minor_index; | 415 | cs->hw.ser->dev.id = cs->minor_index; |
417 | cs->hw.ser->dev.dev.release = gigaset_device_release; | 416 | cs->hw.ser->dev.dev.release = gigaset_device_release; |
418 | if ((rc = platform_device_register(&cs->hw.ser->dev)) != 0) { | 417 | if ((rc = platform_device_register(&cs->hw.ser->dev)) != 0) { |
419 | err("error %d registering platform device", rc); | 418 | pr_err("error %d registering platform device\n", rc); |
420 | kfree(cs->hw.ser); | 419 | kfree(cs->hw.ser); |
421 | cs->hw.ser = NULL; | 420 | cs->hw.ser = NULL; |
422 | return 0; | 421 | return 0; |
@@ -514,11 +513,10 @@ gigaset_tty_open(struct tty_struct *tty) | |||
514 | 513 | ||
515 | gig_dbg(DEBUG_INIT, "Starting HLL for Gigaset M101"); | 514 | gig_dbg(DEBUG_INIT, "Starting HLL for Gigaset M101"); |
516 | 515 | ||
517 | info(DRIVER_AUTHOR); | 516 | pr_info(DRIVER_DESC "\n"); |
518 | info(DRIVER_DESC); | ||
519 | 517 | ||
520 | if (!driver) { | 518 | if (!driver) { |
521 | err("%s: no driver structure", __func__); | 519 | pr_err("%s: no driver structure\n", __func__); |
522 | return -ENODEV; | 520 | return -ENODEV; |
523 | } | 521 | } |
524 | 522 | ||
@@ -571,11 +569,10 @@ gigaset_tty_close(struct tty_struct *tty) | |||
571 | } | 569 | } |
572 | 570 | ||
573 | /* prevent other callers from entering ldisc methods */ | 571 | /* prevent other callers from entering ldisc methods */ |
574 | /* FIXME: should use the tty state flags */ | ||
575 | tty->disc_data = NULL; | 572 | tty->disc_data = NULL; |
576 | 573 | ||
577 | if (!cs->hw.ser) | 574 | if (!cs->hw.ser) |
578 | err("%s: no hw cardstate", __func__); | 575 | pr_err("%s: no hw cardstate\n", __func__); |
579 | else { | 576 | else { |
580 | /* wait for running methods to finish */ | 577 | /* wait for running methods to finish */ |
581 | if (!atomic_dec_and_test(&cs->hw.ser->refcnt)) | 578 | if (!atomic_dec_and_test(&cs->hw.ser->refcnt)) |
@@ -673,18 +670,6 @@ gigaset_tty_ioctl(struct tty_struct *tty, struct file *file, | |||
673 | } | 670 | } |
674 | 671 | ||
675 | /* | 672 | /* |
676 | * Poll on the tty. | ||
677 | * Unused, always return zero. | ||
678 | * | ||
679 | * FIXME: should probably return an exception - especially on hangup | ||
680 | */ | ||
681 | static unsigned int | ||
682 | gigaset_tty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) | ||
683 | { | ||
684 | return 0; | ||
685 | } | ||
686 | |||
687 | /* | ||
688 | * Called by the tty driver when a block of data has been received. | 673 | * Called by the tty driver when a block of data has been received. |
689 | * Will not be re-entered while running but other ldisc functions | 674 | * Will not be re-entered while running but other ldisc functions |
690 | * may be called in parallel. | 675 | * may be called in parallel. |
@@ -773,7 +758,6 @@ static struct tty_ldisc_ops gigaset_ldisc = { | |||
773 | .read = gigaset_tty_read, | 758 | .read = gigaset_tty_read, |
774 | .write = gigaset_tty_write, | 759 | .write = gigaset_tty_write, |
775 | .ioctl = gigaset_tty_ioctl, | 760 | .ioctl = gigaset_tty_ioctl, |
776 | .poll = gigaset_tty_poll, | ||
777 | .receive_buf = gigaset_tty_receive, | 761 | .receive_buf = gigaset_tty_receive, |
778 | .write_wakeup = gigaset_tty_wakeup, | 762 | .write_wakeup = gigaset_tty_wakeup, |
779 | }; | 763 | }; |
@@ -788,7 +772,7 @@ static int __init ser_gigaset_init(void) | |||
788 | 772 | ||
789 | gig_dbg(DEBUG_INIT, "%s", __func__); | 773 | gig_dbg(DEBUG_INIT, "%s", __func__); |
790 | if ((rc = platform_driver_register(&device_driver)) != 0) { | 774 | if ((rc = platform_driver_register(&device_driver)) != 0) { |
791 | err("error %d registering platform driver", rc); | 775 | pr_err("error %d registering platform driver\n", rc); |
792 | return rc; | 776 | return rc; |
793 | } | 777 | } |
794 | 778 | ||
@@ -799,7 +783,7 @@ static int __init ser_gigaset_init(void) | |||
799 | goto error; | 783 | goto error; |
800 | 784 | ||
801 | if ((rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc)) != 0) { | 785 | if ((rc = tty_register_ldisc(N_GIGASET_M101, &gigaset_ldisc)) != 0) { |
802 | err("error %d registering line discipline", rc); | 786 | pr_err("error %d registering line discipline\n", rc); |
803 | goto error; | 787 | goto error; |
804 | } | 788 | } |
805 | 789 | ||
@@ -826,7 +810,7 @@ static void __exit ser_gigaset_exit(void) | |||
826 | } | 810 | } |
827 | 811 | ||
828 | if ((rc = tty_unregister_ldisc(N_GIGASET_M101)) != 0) | 812 | if ((rc = tty_unregister_ldisc(N_GIGASET_M101)) != 0) |
829 | err("error %d unregistering line discipline", rc); | 813 | pr_err("error %d unregistering line discipline\n", rc); |
830 | 814 | ||
831 | platform_driver_unregister(&device_driver); | 815 | platform_driver_unregister(&device_driver); |
832 | } | 816 | } |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 4661830a49db..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,13 +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 | info(DRIVER_AUTHOR); | 945 | pr_info(DRIVER_DESC "\n"); |
945 | info(DRIVER_DESC); | ||
946 | return 0; | 946 | return 0; |
947 | 947 | ||
948 | error: | 948 | error: |