summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJaejoong Kim2017-10-20 09:25:28 +0200
committerMauro Carvalho Chehab2017-10-31 12:23:03 +0100
commit6981d6e55c70b831acf8bea99545adcf940949b5 (patch)
tree870bc82341818d5df3b09f096d6a685b2b896d9c /drivers/media
parentmedia: rockchip/rga: annotate PM functions as __maybe_unused (diff)
downloadkernel-qcow2-linux-6981d6e55c70b831acf8bea99545adcf940949b5.tar.gz
kernel-qcow2-linux-6981d6e55c70b831acf8bea99545adcf940949b5.tar.xz
kernel-qcow2-linux-6981d6e55c70b831acf8bea99545adcf940949b5.zip
media: usb: usbtv: remove duplicate & operation
usb_endpoint_maxp() has an inline keyword and searches for bits[10:0] by & operation with 0x7ff. So, we can remove the duplicate & operation with 0x7ff. Signed-off-by: Jaejoong Kim <climbbb.kim@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/usbtv/usbtv-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c
index f06f09a0876e..b55b79b8e921 100644
--- a/drivers/media/usb/usbtv/usbtv-core.c
+++ b/drivers/media/usb/usbtv/usbtv-core.c
@@ -84,7 +84,7 @@ static int usbtv_probe(struct usb_interface *intf,
/* Packet size is split into 11 bits of base size and count of
* extra multiplies of it.*/
size = usb_endpoint_maxp(&ep->desc);
- size = (size & 0x07ff) * usb_endpoint_maxp_mult(&ep->desc);
+ size = size * usb_endpoint_maxp_mult(&ep->desc);
/* Device structure */
usbtv = kzalloc(sizeof(struct usbtv), GFP_KERNEL);