Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318195
b: refs/heads/master
c: b7e938d
h: refs/heads/master
i:
  318193: b4ed573
  318191: ad6d4ab
v: v3
  • Loading branch information
NeilBrown authored and Greg Kroah-Hartman committed Jun 13, 2012
1 parent 9b32623 commit db2a764
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: 7b5362a603a1ecc9a25b97dafd702b8098090f41
refs/heads/master: b7e938d06d0de43bdbee8844a8736c81480c1031
15 changes: 6 additions & 9 deletions trunk/drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
{
int ret = 0;
u8 status;
unsigned long timeout = jiffies + OMAP_HDQ_TIMEOUT;

ret = mutex_lock_interruptible(&hdq_data->hdq_mutex);
if (ret < 0) {
Expand All @@ -372,15 +371,13 @@ static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO,
OMAP_HDQ_CTRL_STATUS_DIR | OMAP_HDQ_CTRL_STATUS_GO);
/*
* The RX comes immediately after TX. It
* triggers another interrupt before we
* sleep. So we have to wait for RXCOMPLETE bit.
* The RX comes immediately after TX.
*/
while (!(hdq_data->hdq_irqstatus
& OMAP_HDQ_INT_STATUS_RXCOMPLETE)
&& time_before(jiffies, timeout)) {
schedule_timeout_uninterruptible(1);
}
wait_event_timeout(hdq_wait_queue,
(hdq_data->hdq_irqstatus
& OMAP_HDQ_INT_STATUS_RXCOMPLETE),
OMAP_HDQ_TIMEOUT);

hdq_reg_merge(hdq_data, OMAP_HDQ_CTRL_STATUS, 0,
OMAP_HDQ_CTRL_STATUS_DIR);
status = hdq_data->hdq_irqstatus;
Expand Down

0 comments on commit db2a764

Please sign in to comment.