Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318194
b: refs/heads/master
c: 7b5362a
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and Greg Kroah-Hartman committed Jun 13, 2012
1 parent b4ed573 commit 9b32623
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: dd0aa67cd7cf3f4a3ca52ecc1d6b82f3fad1352b
refs/heads/master: 7b5362a603a1ecc9a25b97dafd702b8098090f41
15 changes: 8 additions & 7 deletions trunk/drivers/w1/masters/omap_hdq.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,15 @@ static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
hdq_data->hdq_irqstatus, OMAP_HDQ_TIMEOUT);
if (ret == 0) {
dev_dbg(hdq_data->dev, "TX wait elapsed\n");
ret = -ETIMEDOUT;
goto out;
}

*status = hdq_data->hdq_irqstatus;
/* check irqstatus */
if (!(*status & OMAP_HDQ_INT_STATUS_TXCOMPLETE)) {
dev_dbg(hdq_data->dev, "timeout waiting for"
"TXCOMPLETE/RXCOMPLETE, %x", *status);
" TXCOMPLETE/RXCOMPLETE, %x", *status);
ret = -ETIMEDOUT;
goto out;
}
Expand All @@ -198,7 +199,7 @@ static int hdq_write_byte(struct hdq_data *hdq_data, u8 val, u8 *status)
OMAP_HDQ_FLAG_CLEAR, &tmp_status);
if (ret) {
dev_dbg(hdq_data->dev, "timeout waiting GO bit"
"return to zero, %x", tmp_status);
" return to zero, %x", tmp_status);
}

out:
Expand Down Expand Up @@ -341,7 +342,7 @@ static int omap_hdq_break(struct hdq_data *hdq_data)
&tmp_status);
if (ret)
dev_dbg(hdq_data->dev, "timeout waiting INIT&GO bits"
"return to zero, %x", tmp_status);
" return to zero, %x", tmp_status);

out:
mutex_unlock(&hdq_data->hdq_mutex);
Expand Down Expand Up @@ -386,7 +387,7 @@ static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
/* check irqstatus */
if (!(status & OMAP_HDQ_INT_STATUS_RXCOMPLETE)) {
dev_dbg(hdq_data->dev, "timeout waiting for"
"RXCOMPLETE, %x", status);
" RXCOMPLETE, %x", status);
ret = -ETIMEDOUT;
goto out;
}
Expand All @@ -396,7 +397,7 @@ static int hdq_read_byte(struct hdq_data *hdq_data, u8 *val)
out:
mutex_unlock(&hdq_data->hdq_mutex);
rtn:
return 0;
return ret;

}

Expand Down Expand Up @@ -470,7 +471,7 @@ static int omap_hdq_put(struct hdq_data *hdq_data)

if (0 == hdq_data->hdq_usecount) {
dev_dbg(hdq_data->dev, "attempt to decrement use count"
"when it is zero");
" when it is zero");
ret = -EINVAL;
} else {
hdq_data->hdq_usecount--;
Expand Down Expand Up @@ -540,7 +541,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
mutex_unlock(&hdq_data->hdq_mutex);

ret = hdq_write_byte(hdq_data, byte, &status);
if (ret == 0) {
if (ret < 0) {
dev_dbg(hdq_data->dev, "TX failure:Ctrl status %x\n", status);
return;
}
Expand Down

0 comments on commit 9b32623

Please sign in to comment.