Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Robert Butora and committed by
Mauro Carvalho Chehab
ac9687a2 c3e1870c

+11 -4
+11 -4
drivers/media/usb/gspca/dtcs033.c
··· 22 22 MODULE_DESCRIPTION("Scopium DTCS033 astro-cam USB Camera Driver"); 23 23 MODULE_LICENSE("GPL"); 24 24 25 + struct dtcs033_usb_requests { 26 + u8 bRequestType; 27 + u8 bRequest; 28 + u16 wValue; 29 + u16 wIndex; 30 + u16 wLength; 31 + }; 25 32 26 33 /* send a usb request */ 27 34 static void reg_rw(struct gspca_dev *gspca_dev, ··· 57 50 } 58 51 /* send several usb in/out requests */ 59 52 static int reg_reqs(struct gspca_dev *gspca_dev, 60 - const struct usb_ctrlrequest *preqs, int n_reqs) 53 + const struct dtcs033_usb_requests *preqs, int n_reqs) 61 54 { 62 55 int i = 0; 63 - const struct usb_ctrlrequest *preq; 56 + const struct dtcs033_usb_requests *preq; 64 57 65 58 while ((i < n_reqs) && (gspca_dev->usb_err >= 0)) { 66 59 ··· 297 290 0x40 = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 298 291 0xC0 = USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 299 292 */ 300 - static const struct usb_ctrlrequest dtcs033_start_reqs[] = { 293 + static const struct dtcs033_usb_requests dtcs033_start_reqs[] = { 301 294 /* -- bRequest,wValue,wIndex,wLength */ 302 295 { 0x40, 0x01, 0x0001, 0x000F, 0x0000 }, 303 296 { 0x40, 0x01, 0x0000, 0x000F, 0x0000 }, ··· 421 414 { 0x40, 0x01, 0x0003, 0x000F, 0x0000 } 422 415 }; 423 416 424 - static const struct usb_ctrlrequest dtcs033_stop_reqs[] = { 417 + static const struct dtcs033_usb_requests dtcs033_stop_reqs[] = { 425 418 /* -- bRequest,wValue,wIndex,wLength */ 426 419 { 0x40, 0x01, 0x0001, 0x000F, 0x0000 }, 427 420 { 0x40, 0x01, 0x0000, 0x000F, 0x0000 },