aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/speakup/kobjects.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-04-30 15:27:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 17:04:03 -0700
commit576d742e4a0d0f1bab7950012addccb82fbc172a (patch)
tree83311a3aee32e8d250b225726382f69209fb19ca /drivers/staging/speakup/kobjects.c
parent16c7fa05829e8b91db48e3539c5d6ff3c2b18a23 (diff)
staging: speakup: remove custom string_unescape_any_inplace
There is generic implementation of the function to unescape strings. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: William Hubbs <w.d.hubbs@gmail.com> Cc: Chris Brannon <chris@the-brannons.com> Cc: Kirk Reiser <kirk@braille.uwo.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/staging/speakup/kobjects.c')
-rw-r--r--drivers/staging/speakup/kobjects.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c
index d6d9264e4ca7..943b6c134a22 100644
--- a/drivers/staging/speakup/kobjects.c
+++ b/drivers/staging/speakup/kobjects.c
@@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/kobject.h>
#include <linux/string.h>
+#include <linux/string_helpers.h>
#include <linux/sysfs.h>
#include <linux/ctype.h>
@@ -417,7 +418,7 @@ static ssize_t synth_direct_store(struct kobject *kobj,
bytes = min_t(size_t, len, 250);
strncpy(tmp, ptr, bytes);
tmp[bytes] = '\0';
- spk_xlate(tmp);
+ string_unescape_any_inplace(tmp);
synth_printf("%s", tmp);
ptr += bytes;
len -= bytes;
@@ -605,7 +606,8 @@ ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
if (param->data == NULL)
return 0;
ret = 0;
- cp = spk_xlate((char *) buf);
+ cp = (char *)buf;
+ string_unescape_any_inplace(cp);
spk_lock(flags);
switch (param->var_type) {