summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-08-15 18:22:35 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-09-22 22:27:01 +0200
commit5611588b86492eded428cad0f698c39178f88d23 (patch)
tree5b8ccd9363fc152a388b7448091acef209809d1c /drivers/media/rc
parent[media] media/rc/imon.c: use USB API functions rather than constants (diff)
downloadlinux-5611588b86492eded428cad0f698c39178f88d23.tar.xz
linux-5611588b86492eded428cad0f698c39178f88d23.zip
[media] rc-core: use USB API functions rather than constants
This patch introduces the use of !usb_endpoint_dir_in(epd) and !usb_endpoint_xfer_int(epd). The Coccinelle semantic patch that makes these changes is as follows: - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) != - \(USB_DIR_IN\|0x80\)) + !usb_endpoint_dir_in(epd) @@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) != - \(USB_ENDPOINT_XFER_INT\|3\)) + !usb_endpoint_xfer_int(epd) Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/streamzap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c
index 80c4feeb01ea..bf4a44272f0e 100644
--- a/drivers/media/rc/streamzap.c
+++ b/drivers/media/rc/streamzap.c
@@ -362,16 +362,14 @@ static int streamzap_probe(struct usb_interface *intf,
}
sz->endpoint = &(iface_host->endpoint[0].desc);
- if ((sz->endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK)
- != USB_DIR_IN) {
+ if (!usb_endpoint_dir_in(sz->endpoint)) {
dev_err(&intf->dev, "%s: endpoint doesn't match input device "
"02%02x\n", __func__, sz->endpoint->bEndpointAddress);
retval = -ENODEV;
goto free_sz;
}
- if ((sz->endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
- != USB_ENDPOINT_XFER_INT) {
+ if (!usb_endpoint_xfer_int(sz->endpoint)) {
dev_err(&intf->dev, "%s: endpoint attributes don't match xfer "
"02%02x\n", __func__, sz->endpoint->bmAttributes);
retval = -ENODEV;