From ff3ec57df9e87bcb18e81157cbe3bef3159d76a3 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 20 Aug 2014 19:25:34 -0300 Subject: [media] s2255drv: fix sparse warning drivers/media/usb/s2255/s2255drv.c:2248:20: warning: cast to restricted __le16 At the USB structs there are two different idProduct: usb_device_id::idProduct - already on CPU endiannes usb_device::descriptor.idProduct - with is LE16 In this specific case, the driver checks for the one at usb_device_id struct, with already have CPU endianness. So, no conversion is required. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/s2255/s2255drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/usb/s2255') diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 2c901861034a..ccc00099b261 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -2245,7 +2245,7 @@ static int s2255_probe(struct usb_interface *interface, } atomic_set(&dev->num_channels, 0); - dev->pid = le16_to_cpu(id->idProduct); + dev->pid = id->idProduct; dev->fw_data = kzalloc(sizeof(struct s2255_fw), GFP_KERNEL); if (!dev->fw_data) goto errorFWDATA1; -- cgit v1.2.3