staging: speakup: use native error codes
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 28 Mar 2013 09:02:44 +0000 (11:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Mar 2013 15:41:15 +0000 (08:41 -0700)
commit6a48f88b528fef7c4b6ad609111a8acfb5d65335
tree58f4551121772dc7fcea13e96428ff4837bcce4d
parent1627ab92b2e6307525f43f775aaeac54407981ef
staging: speakup: use native error codes

The mapping as follows:
E_RANGE -> ERANGE
E_UNDEF -> ENODATA
E_TOOLONG -> E2BIG
SET_DEFAULT -> ERESTART

As a side effect it fixes a bug in spk_var_store() where return code was
mistakenly compared to negative value instead of positive.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/kobjects.c
drivers/staging/speakup/speakup.h
drivers/staging/speakup/varhandlers.c