Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[sfrench/cifs-2.6.git] / drivers / usb / gadget / usbstring.c
index 3459ea6c6c0b4d7bac7bfbd50dbf1153db0ca27d..58c4d37d312a4ce40e487abeb36e45c34c3002fc 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/init.h>
 
 #include <linux/usb/ch9.h>
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
 
 #include <asm/unaligned.h>
 
@@ -38,7 +38,7 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len)
                                uchar = (c & 0x1f) << 6;
 
                                c = (u8) *s++;
-                               if ((c & 0xc0) != 0xc0)
+                               if ((c & 0xc0) != 0x80)
                                        goto fail;
                                c &= 0x3f;
                                uchar |= c;
@@ -49,13 +49,13 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len)
                                uchar = (c & 0x0f) << 12;
 
                                c = (u8) *s++;
-                               if ((c & 0xc0) != 0xc0)
+                               if ((c & 0xc0) != 0x80)
                                        goto fail;
                                c &= 0x3f;
                                uchar |= c << 6;
 
                                c = (u8) *s++;
-                               if ((c & 0xc0) != 0xc0)
+                               if ((c & 0xc0) != 0x80)
                                        goto fail;
                                c &= 0x3f;
                                uchar |= c;
@@ -74,7 +74,7 @@ static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len)
                                goto fail;
                } else
                        uchar = c;
-               put_unaligned (cpu_to_le16 (uchar), cp++);
+               put_unaligned_le16(uchar, cp++);
                count++;
                len--;
        }