diff options
author | Rashika Kheria <rashika.kheria@gmail.com> | 2013-10-26 17:15:21 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-27 20:43:46 -0700 |
commit | c0fa05f3dec43d859d12f00d2843c770a12eef30 (patch) | |
tree | de6ca652926a86ae31e84f21fde358d44e3522ff /drivers/staging/line6 | |
parent | f3912ce33617d963dad2eba494c804ead5e28de4 (diff) | |
download | linux-c0fa05f3dec43d859d12f00d2843c770a12eef30.tar.bz2 |
Staging: line6: Fix Sparse Warning of incorrect type
This patch fixes the following sparse warnings in toneport.c-
drivers/staging/line6/toneport.c:329:48: warning: incorrect type in argument 1 (different base types)
drivers/staging/line6/toneport.c:329:48: expected short [signed] product
drivers/staging/line6/toneport.c:329:48: got restricted __le16 [usertype] idProduct
drivers/staging/line6/toneport.c:385:48: warning: incorrect type in argument 1 (different base types)
drivers/staging/line6/toneport.c:385:48: expected short [signed] product
drivers/staging/line6/toneport.c:385:48: got restricted __le16 [usertype] idProduct
drivers/staging/line6/toneport.c:438:64: warning: incorrect type in argument 1 (different base types)
drivers/staging/line6/toneport.c:438:64: expected short [signed] product
drivers/staging/line6/toneport.c:438:64: got restricted __le16 [usertype] idProduct
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/line6')
-rw-r--r-- | drivers/staging/line6/toneport.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 7bca1e2fedcb..af2e7e50c135 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/staging/line6/toneport.c @@ -307,6 +307,7 @@ static void toneport_setup(struct usb_line6_toneport *toneport) int ticks; struct usb_line6 *line6 = &toneport->line6; struct usb_device *usbdev = line6->usbdev; + u16 idProduct = le16_to_cpu(usbdev->descriptor.idProduct); /* sync time on device with host: */ ticks = (int)get_seconds(); @@ -326,7 +327,7 @@ static void toneport_setup(struct usb_line6_toneport *toneport) 0x0000); } - if (toneport_has_led(usbdev->descriptor.idProduct)) + if (toneport_has_led(idProduct)) toneport_update_led(&usbdev->dev); } @@ -339,6 +340,7 @@ static int toneport_try_init(struct usb_interface *interface, int err; struct usb_line6 *line6 = &toneport->line6; struct usb_device *usbdev = line6->usbdev; + u16 idProduct = le16_to_cpu(usbdev->descriptor.idProduct); if ((interface == NULL) || (toneport == NULL)) return -ENODEV; @@ -382,7 +384,7 @@ static int toneport_try_init(struct usb_interface *interface, line6_read_serial_number(line6, &toneport->serial_number); line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1); - if (toneport_has_led(usbdev->descriptor.idProduct)) { + if (toneport_has_led(idProduct)) { CHECK_RETURN(device_create_file (&interface->dev, &dev_attr_led_red)); CHECK_RETURN(device_create_file @@ -428,14 +430,16 @@ void line6_toneport_reset_resume(struct usb_line6_toneport *toneport) void line6_toneport_disconnect(struct usb_interface *interface) { struct usb_line6_toneport *toneport; + u16 idProduct; if (interface == NULL) return; toneport = usb_get_intfdata(interface); del_timer_sync(&toneport->timer); + idProduct = le16_to_cpu(toneport->line6.usbdev->descriptor.idProduct); - if (toneport_has_led(toneport->line6.usbdev->descriptor.idProduct)) { + if (toneport_has_led(idProduct)) { device_remove_file(&interface->dev, &dev_attr_led_red); device_remove_file(&interface->dev, &dev_attr_led_green); } |