git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mISDN: Fixed missing spin lock on pipeline process
[safe/jmp/linux-2.6]
/
drivers
/
isdn
/
gigaset
/
common.c
diff --git
a/drivers/isdn/gigaset/common.c
b/drivers/isdn/gigaset/common.c
index
9d3ce77
..
e4141bf
100644
(file)
--- a/
drivers/isdn/gigaset/common.c
+++ b/
drivers/isdn/gigaset/common.c
@@
-565,8
+565,6
@@
static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
gig_dbg(DEBUG_INIT, "setting up bcs[%d]->at_state", channel);
gigaset_at_init(&bcs->at_state, bcs, cs, -1);
gig_dbg(DEBUG_INIT, "setting up bcs[%d]->at_state", channel);
gigaset_at_init(&bcs->at_state, bcs, cs, -1);
- bcs->rcvbytes = 0;
-
#ifdef CONFIG_GIGASET_DEBUG
bcs->emptycount = 0;
#endif
#ifdef CONFIG_GIGASET_DEBUG
bcs->emptycount = 0;
#endif
@@
-580,7
+578,7
@@
static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
} else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
skb_reserve(bcs->skb, HW_HDR_LEN);
else {
} else if ((bcs->skb = dev_alloc_skb(SBUFSIZE + HW_HDR_LEN)) != NULL)
skb_reserve(bcs->skb, HW_HDR_LEN);
else {
-
warn("could not allocate skb
");
+
pr_err("out of memory\n
");
bcs->inputstate |= INS_skip_frame;
}
bcs->inputstate |= INS_skip_frame;
}
@@
-634,20
+632,20
@@
struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
gig_dbg(DEBUG_INIT, "allocating cs");
if (!(cs = alloc_cs(drv))) {
gig_dbg(DEBUG_INIT, "allocating cs");
if (!(cs = alloc_cs(drv))) {
-
err("maximum number of devices exceeded
");
+
pr_err("maximum number of devices exceeded\n
");
return NULL;
}
gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1);
cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL);
if (!cs->bcs) {
return NULL;
}
gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1);
cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL);
if (!cs->bcs) {
-
err("out of memory
");
+
pr_err("out of memory\n
");
goto error;
}
gig_dbg(DEBUG_INIT, "allocating inbuf");
cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL);
if (!cs->inbuf) {
goto error;
}
gig_dbg(DEBUG_INIT, "allocating inbuf");
cs->inbuf = kmalloc(sizeof(struct inbuf_t), GFP_KERNEL);
if (!cs->inbuf) {
-
err("out of memory
");
+
pr_err("out of memory\n
");
goto error;
}
goto error;
}
@@
-672,14
+670,8
@@
struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
cs->tty = NULL;
cs->tty_dev = NULL;
cs->cidmode = cidmode != 0;
cs->tty = NULL;
cs->tty_dev = NULL;
cs->cidmode = cidmode != 0;
-
- //if(onechannel) { //FIXME
- cs->tabnocid = gigaset_tab_nocid_m10x;
- cs->tabcid = gigaset_tab_cid_m10x;
- //} else {
- // cs->tabnocid = gigaset_tab_nocid;
- // cs->tabcid = gigaset_tab_cid;
- //}
+ cs->tabnocid = gigaset_tab_nocid;
+ cs->tabcid = gigaset_tab_cid;
init_waitqueue_head(&cs->waitqueue);
cs->waiting = 0;
init_waitqueue_head(&cs->waitqueue);
cs->waiting = 0;
@@
-690,7
+682,7
@@
struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
for (i = 0; i < channels; ++i) {
gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i);
if (!gigaset_initbcs(cs->bcs + i, cs, i)) {
for (i = 0; i < channels; ++i) {
gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i);
if (!gigaset_initbcs(cs->bcs + i, cs, i)) {
-
err("could not allocate channel %d data
", i);
+
pr_err("could not allocate channel %d data\n
", i);
goto error;
}
}
goto error;
}
}
@@
-720,17
+712,15
@@
struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
gig_dbg(DEBUG_INIT, "setting up iif");
if (!gigaset_register_to_LL(cs, modulename)) {
gig_dbg(DEBUG_INIT, "setting up iif");
if (!gigaset_register_to_LL(cs, modulename)) {
-
err("register_isdn failed
");
+
pr_err("error registering ISDN device\n
");
goto error;
}
make_valid(cs, VALID_ID);
++cs->cs_init;
gig_dbg(DEBUG_INIT, "setting up hw");
goto error;
}
make_valid(cs, VALID_ID);
++cs->cs_init;
gig_dbg(DEBUG_INIT, "setting up hw");
- if (!cs->ops->initcshw(cs)) {
- err("could not allocate device specific data");
+ if (!cs->ops->initcshw(cs))
goto error;
goto error;
- }
++cs->cs_init;
++cs->cs_init;
@@
-836,7
+826,7
@@
static void cleanup_cs(struct cardstate *cs)
for (i = 0; i < cs->channels; ++i) {
gigaset_freebcs(cs->bcs + i);
if (!gigaset_initbcs(cs->bcs + i, cs, i))
for (i = 0; i < cs->channels; ++i) {
gigaset_freebcs(cs->bcs + i);
if (!gigaset_initbcs(cs->bcs + i, cs, i))
- break; //FIXME error handling
+ pr_err("could not allocate channel %d data\n", i);
}
if (cs->waiting) {
}
if (cs->waiting) {
@@
-1120,8
+1110,7
@@
static int __init gigaset_init_module(void)
if (gigaset_debuglevel == 1)
gigaset_debuglevel = DEBUG_DEFAULT;
if (gigaset_debuglevel == 1)
gigaset_debuglevel = DEBUG_DEFAULT;
- info(DRIVER_AUTHOR);
- info(DRIVER_DESC);
+ pr_info(DRIVER_DESC "\n");
return 0;
}
return 0;
}