[OPW,kernel,2/3] Staging: line6: Fix Sparse Warning of restricted __le16 degrades to integer
diff mbox

Message ID 6df7ee405c98c2c35007c4770ff13eaf69e23aa6.1382787711.git.rashika.kheria@gmail.com
State Accepted
Headers show

Commit Message

Rashika Oct. 26, 2013, 11:43 a.m. UTC
This patch fixes the following sparse warning in toneport.c-
warning: restricted __le16 degrades to integer

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/line6/toneport.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch
diff mbox

diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index 776d363..7bca1e2 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -316,7 +316,7 @@  static void toneport_setup(struct usb_line6_toneport *toneport)
 	toneport_send_cmd(usbdev, 0x0301, 0x0000);
 
 	/* initialize source select: */
-	switch (usbdev->descriptor.idProduct) {
+	switch (le16_to_cpu(usbdev->descriptor.idProduct)) {
 	case LINE6_DEVID_TONEPORT_UX1:
 	case LINE6_DEVID_TONEPORT_UX2:
 	case LINE6_DEVID_PODSTUDIO_UX1:
@@ -361,7 +361,7 @@  static int toneport_try_init(struct usb_interface *interface,
 		return err;
 
 	/* register source select control: */
-	switch (usbdev->descriptor.idProduct) {
+	switch (le16_to_cpu(usbdev->descriptor.idProduct)) {
 	case LINE6_DEVID_TONEPORT_UX1:
 	case LINE6_DEVID_TONEPORT_UX2:
 	case LINE6_DEVID_PODSTUDIO_UX1: