Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205620
b: refs/heads/master
c: 36e574f
h: refs/heads/master
v: v3
  • Loading branch information
Naveen Jain authored and Greg Kroah-Hartman committed Jun 18, 2010
1 parent 30ba394 commit bb5b055
Show file tree
Hide file tree
Showing 2 changed files with 9 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: e2a53282859fab0e428a243cbe9ca8d727d9d840
refs/heads/master: 36e574fed5578aeee0ce4c7359bc17cc0b8e0b57
13 changes: 8 additions & 5 deletions trunk/drivers/staging/ti-st/st_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,10 +584,11 @@ void kim_st_list_protocols(struct st_data_s *st_gdata, char *buf)
}
sprintf(buf, "%s\n", buf);
#else /* limited info */
sprintf(buf, "BT=%c\nFM=%c\nGPS=%c\n",
st_gdata->list[ST_BT] != NULL ? 'R' : 'U',
st_gdata->list[ST_FM] != NULL ? 'R' : 'U',
st_gdata->list[ST_GPS] != NULL ? 'R' : 'U');
sprintf(buf, "[%d]\nBT=%c\nFM=%c\nGPS=%c\n",
st_gdata->protos_registered,
st_gdata->list[ST_BT] != NULL ? 'R' : 'U',
st_gdata->list[ST_FM] != NULL ? 'R' : 'U',
st_gdata->list[ST_GPS] != NULL ? 'R' : 'U');
#endif
spin_unlock_irqrestore(&st_gdata->lock, flags);
}
Expand Down Expand Up @@ -630,6 +631,7 @@ long st_register(struct st_proto_s *new_proto)
st_kim_chip_toggle(new_proto->type, KIM_GPIO_ACTIVE);

st_gdata->list[new_proto->type] = new_proto;
st_gdata->protos_registered++;
new_proto->write = st_write;

set_bit(ST_REG_PENDING, &st_gdata->st_state);
Expand Down Expand Up @@ -673,7 +675,6 @@ long st_register(struct st_proto_s *new_proto)
if ((st_gdata->protos_registered != ST_EMPTY) &&
(test_bit(ST_REG_PENDING, &st_gdata->st_state))) {
pr_info(" call reg complete callback ");
st_gdata->protos_registered++;
st_reg_complete(st_gdata, ST_SUCCESS);
}
clear_bit(ST_REG_PENDING, &st_gdata->st_state);
Expand All @@ -689,6 +690,7 @@ long st_register(struct st_proto_s *new_proto)

spin_lock_irqsave(&st_gdata->lock, flags);
st_gdata->list[new_proto->type] = new_proto;
st_gdata->protos_registered++;
new_proto->write = st_write;
spin_unlock_irqrestore(&st_gdata->lock, flags);
return err;
Expand All @@ -712,6 +714,7 @@ long st_register(struct st_proto_s *new_proto)
break;
}
st_gdata->list[new_proto->type] = new_proto;
st_gdata->protos_registered++;
new_proto->write = st_write;

/* lock already held before entering else */
Expand Down

0 comments on commit bb5b055

Please sign in to comment.