w1: omap_hdq: Fix some error/debug handling.
- some debug messages missed spaces - sometimes no error was returned when it should have been - sometimes a message is printed when there is no error, rather than when there is one. Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dd0aa67cd7
commit
7b5362a603
1 changed files with 8 additions and 7 deletions
|
@ -180,6 +180,7 @@ 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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue