isdn/bas_gigaset: use USB API functions rather than constants
authorHimangi Saraogi <himangi774@gmail.com>
Sun, 17 Aug 2014 00:31:20 +0000 (06:01 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 Aug 2014 19:23:10 +0000 (12:23 -0700)
This patch introduces the use of the function usb_endpoint_num.

The Coccinelle semantic patch that makes these changes is as follows:

@@ struct usb_endpoint_descriptor *epd; @@

- (epd->bEndpointAddress & \(USB_ENDPOINT_NUMBER_MASK\|0x0f\))
+ usb_endpoint_num(epd)

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/gigaset/bas-gigaset.c

index b7ae0a0dd5b6814c61332d3f56b4b7626754ddea..aecec6d3246370004a0e9434a1f58303e96b7c46 100644 (file)
@@ -2365,7 +2365,7 @@ static int gigaset_probe(struct usb_interface *interface,
        endpoint = &hostif->endpoint[0].desc;
        usb_fill_int_urb(ucs->urb_int_in, udev,
                         usb_rcvintpipe(udev,
-                                       (endpoint->bEndpointAddress) & 0x0f),
+                                       usb_endpoint_num(endpoint)),
                         ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs,
                         endpoint->bInterval);
        rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL);