lkml.org 
[lkml]   [2017]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/3] lib/string: introduce ascii2utf16le() helper
From
Date
On 02/06/2017 04:12 PM, Alan Stern wrote:
> On Mon, 6 Feb 2017, Richard Leitner wrote:
>
>> For USB string descriptors we need to convert ASCII strings to UTF16-LE.
>> Therefore make a simple helper function (based on ascii2desc from
>> drivers/usb/core/hcd.c) for that purpose.
>
> You know, we already have utf8s_to_utf16s() in fs/nls/nls_base.c.
> Maybe it doesn't do exactly what you want, but it should be pretty
> close. Adding another helper function to do essentially the same thing
> seems unnecessary.

Thanks for that pointer. I totally agree with you.

So it would be OK to include linux/nls.h and use utf8s_to_utf16s() in
drivers/usb/{core/hcd.c,misc/usb251xb.c}?

Thanks & regards,
Richard L

\
 
 \ /
  Last update: 2017-02-06 16:32    [W:0.337 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site