aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
diff options
context:
space:
mode:
authorRobert Butora <robert.butora.fi@gmail.com>2014-04-16 14:46:49 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-23 09:07:52 -0400
commitac9687a2e6abd7d87af413d1a8eb78f947921464 (patch)
tree0d13840a48c4159f556a14fb15a27b086cf55cbd /drivers/media/usb
parentc3e1870c4aa320b592ef5ebcb5dd0690657a1226 (diff)
[media] media:gspca:dtcs033 Clean sparse check warnings on endianess
Warnings due to __le16 / u16 conversions. Replace offending struct and so stay on cpu domain. Signed-off-by: Robert Butora <robert.butora.fi@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r--drivers/media/usb/gspca/dtcs033.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/media/usb/gspca/dtcs033.c b/drivers/media/usb/gspca/dtcs033.c
index 5e42c711b98d..96bfd4e0f0eb 100644
--- a/drivers/media/usb/gspca/dtcs033.c
+++ b/drivers/media/usb/gspca/dtcs033.c
@@ -22,6 +22,13 @@ MODULE_AUTHOR("Robert Butora <robert.butora.fi@gmail.com>");
22MODULE_DESCRIPTION("Scopium DTCS033 astro-cam USB Camera Driver"); 22MODULE_DESCRIPTION("Scopium DTCS033 astro-cam USB Camera Driver");
23MODULE_LICENSE("GPL"); 23MODULE_LICENSE("GPL");
24 24
25struct dtcs033_usb_requests {
26 u8 bRequestType;
27 u8 bRequest;
28 u16 wValue;
29 u16 wIndex;
30 u16 wLength;
31};
25 32
26/* send a usb request */ 33/* send a usb request */
27static void reg_rw(struct gspca_dev *gspca_dev, 34static void reg_rw(struct gspca_dev *gspca_dev,
@@ -50,10 +57,10 @@ static void reg_rw(struct gspca_dev *gspca_dev,
50} 57}
51/* send several usb in/out requests */ 58/* send several usb in/out requests */
52static int reg_reqs(struct gspca_dev *gspca_dev, 59static int reg_reqs(struct gspca_dev *gspca_dev,
53 const struct usb_ctrlrequest *preqs, int n_reqs) 60 const struct dtcs033_usb_requests *preqs, int n_reqs)
54{ 61{
55 int i = 0; 62 int i = 0;
56 const struct usb_ctrlrequest *preq; 63 const struct dtcs033_usb_requests *preq;
57 64
58 while ((i < n_reqs) && (gspca_dev->usb_err >= 0)) { 65 while ((i < n_reqs) && (gspca_dev->usb_err >= 0)) {
59 66
@@ -290,7 +297,7 @@ module_usb_driver(sd_driver);
290 0x40 = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 297 0x40 = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
291 0xC0 = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 298 0xC0 = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
292*/ 299*/
293static const struct usb_ctrlrequest dtcs033_start_reqs[] = { 300static const struct dtcs033_usb_requests dtcs033_start_reqs[] = {
294/* -- bRequest,wValue,wIndex,wLength */ 301/* -- bRequest,wValue,wIndex,wLength */
295{ 0x40, 0x01, 0x0001, 0x000F, 0x0000 }, 302{ 0x40, 0x01, 0x0001, 0x000F, 0x0000 },
296{ 0x40, 0x01, 0x0000, 0x000F, 0x0000 }, 303{ 0x40, 0x01, 0x0000, 0x000F, 0x0000 },
@@ -414,7 +421,7 @@ static const struct usb_ctrlrequest dtcs033_start_reqs[] = {
414{ 0x40, 0x01, 0x0003, 0x000F, 0x0000 } 421{ 0x40, 0x01, 0x0003, 0x000F, 0x0000 }
415}; 422};
416 423
417static const struct usb_ctrlrequest dtcs033_stop_reqs[] = { 424static const struct dtcs033_usb_requests dtcs033_stop_reqs[] = {
418/* -- bRequest,wValue,wIndex,wLength */ 425/* -- bRequest,wValue,wIndex,wLength */
419{ 0x40, 0x01, 0x0001, 0x000F, 0x0000 }, 426{ 0x40, 0x01, 0x0001, 0x000F, 0x0000 },
420{ 0x40, 0x01, 0x0000, 0x000F, 0x0000 }, 427{ 0x40, 0x01, 0x0000, 0x000F, 0x0000 },