aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/ti-st/st_ll.c
diff options
context:
space:
mode:
authorPavan Savoy <pavan_savoy@ti.com>2011-02-04 02:23:11 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-04 12:41:20 -0800
commit704426649dd4324b34cefea322f4333e5280f852 (patch)
tree5f3b511437974e542e07bfc4a4e2558086be25c8 /drivers/misc/ti-st/st_ll.c
parentec60d0ad20ff8796dc41b30a9dce485478ccd263 (diff)
downloadkernel_goldelico_gta04-704426649dd4324b34cefea322f4333e5280f852.zip
kernel_goldelico_gta04-704426649dd4324b34cefea322f4333e5280f852.tar.gz
kernel_goldelico_gta04-704426649dd4324b34cefea322f4333e5280f852.tar.bz2
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>
Diffstat (limited to 'drivers/misc/ti-st/st_ll.c')
-rw-r--r--drivers/misc/ti-st/st_ll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ti-st/st_ll.c b/drivers/misc/ti-st/st_ll.c
index 2bda8de..f72de6b 100644
--- a/drivers/misc/ti-st/st_ll.c
+++ b/drivers/misc/ti-st/st_ll.c
@@ -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;
}