Staging: line6: Fix Sparse warning of restricted __le16 degrades to integer
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 26 Oct 2013 11:42:57 +0000 (17:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Oct 2013 03:43:46 +0000 (20:43 -0700)
This patch fixes the following sparse warning in driver.c-
warning: restricted __le16 degrades to integer

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/line6/driver.c

index ee1799056b482aa33cf7fc01418fa3897fdb3a1f..cc5d62d2b01f4a37f373a3ef9f0fdb8faa256c7d 100644 (file)
@@ -340,7 +340,7 @@ static void line6_data_received(struct urb *urb)
                line6->message_length = done;
                line6_midi_receive(line6, line6->buffer_message, done);
 
-               switch (line6->usbdev->descriptor.idProduct) {
+               switch (le16_to_cpu(line6->usbdev->descriptor.idProduct)) {
                case LINE6_DEVID_BASSPODXT:
                case LINE6_DEVID_BASSPODXTLIVE:
                case LINE6_DEVID_BASSPODXTPRO:
@@ -1010,7 +1010,7 @@ static void line6_disconnect(struct usb_interface *interface)
                        dev_err(line6->ifcdev,
                                "driver bug: inconsistent usb device\n");
 
-               switch (line6->usbdev->descriptor.idProduct) {
+               switch (le16_to_cpu(line6->usbdev->descriptor.idProduct)) {
                case LINE6_DEVID_BASSPODXT:
                case LINE6_DEVID_BASSPODXTLIVE:
                case LINE6_DEVID_BASSPODXTPRO:
@@ -1114,7 +1114,7 @@ static int line6_reset_resume(struct usb_interface *interface)
 {
        struct usb_line6 *line6 = usb_get_intfdata(interface);
 
-       switch (line6->usbdev->descriptor.idProduct) {
+       switch (le16_to_cpu(line6->usbdev->descriptor.idProduct)) {
        case LINE6_DEVID_PODSTUDIO_GX:
        case LINE6_DEVID_PODSTUDIO_UX1:
        case LINE6_DEVID_PODSTUDIO_UX2: