drivers:misc: ti-st: fix error codes

set-right the error codes that the shared transport driver
returns.
Instead of magic numbers like -1, return relevant codes such as
ETIMEDOUT or EIO, EAGAIN when wait times out or uart write bytes don't
match expected value or when registration fails and needs to be
attempted again.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Pavan Savoy
2011-02-04 02:23:11 -06:00
committed by Greg Kroah-Hartman
parent ec60d0ad20
commit 704426649d
3 changed files with 24 additions and 27 deletions

View File

@@ -130,7 +130,7 @@ unsigned long st_ll_sleep_state(struct st_data_s *st_data,
break;
default:
pr_err(" unknown input/state ");
return -1;
return -EINVAL;
}
return 0;
}