Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215430
b: refs/heads/master
c: b003f4e
h: refs/heads/master
v: v3
  • Loading branch information
Jan Kiszka authored and David S. Miller committed Oct 21, 2010
1 parent fbf2951 commit 8d58967
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e253c3b8a1aeed51eef6fc366812f219b97de65
refs/heads/master: b003f4e171304234eae9cc11c9fd7f1cbaaf0d6b
19 changes: 14 additions & 5 deletions trunk/drivers/isdn/capi/kcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ static inline struct capi_ctr *get_capi_ctr_by_nr(u16 contr)
return capi_controller[contr - 1];
}

static inline struct capi20_appl *__get_capi_appl_by_nr(u16 applid)
{
lockdep_assert_held(&capi_controller_lock);

if (applid - 1 >= CAPI_MAXAPPL)
return NULL;

return capi_applications[applid - 1];
}

static inline struct capi20_appl *get_capi_appl_by_nr(u16 applid)
{
if (applid - 1 >= CAPI_MAXAPPL)
Expand Down Expand Up @@ -185,10 +195,9 @@ static void notify_up(u32 contr)
ctr->state = CAPI_CTR_RUNNING;

for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid);
if (!ap)
continue;
register_appl(ctr, applid, &ap->rparam);
ap = __get_capi_appl_by_nr(applid);
if (ap)
register_appl(ctr, applid, &ap->rparam);
}

wake_up_interruptible_all(&ctr->state_wait_queue);
Expand All @@ -215,7 +224,7 @@ static void ctr_down(struct capi_ctr *ctr, int new_state)
memset(ctr->serial, 0, sizeof(ctr->serial));

for (applid = 1; applid <= CAPI_MAXAPPL; applid++) {
ap = get_capi_appl_by_nr(applid);
ap = __get_capi_appl_by_nr(applid);
if (ap)
capi_ctr_put(ctr);
}
Expand Down

0 comments on commit 8d58967

Please sign in to comment.