aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2009-09-22 07:45:16 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-23 11:35:54 -0400
commit33e2fb2f2b5d3b2f491fccab0ead256e34447cc6 (patch)
tree777c9f132d2ec9a1fc7e46c78ac1d97e4901fdf1 /drivers/net/wireless
parent94f85853324e02c3a32bc3101f090dc9a3f512b4 (diff)
drivers/net/wireless: Use usb_endpoint_dir_out
Use the usb_endpoint_dir_out API function. Note that the use of USB_TYPE_MASK in the original code is incorrect; it results in a test that is always false. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ struct usb_endpoint_descriptor *endpoint; expression E; @@ - (endpoint->bEndpointAddress & E) == USB_DIR_OUT + usb_endpoint_dir_out(endpoint) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 38688847d568..23a6a6d4863b 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -1070,7 +1070,7 @@ static int eject_installer(struct usb_interface *intf)
1070 1070
1071 /* Find bulk out endpoint */ 1071 /* Find bulk out endpoint */
1072 endpoint = &iface_desc->endpoint[1].desc; 1072 endpoint = &iface_desc->endpoint[1].desc;
1073 if ((endpoint->bEndpointAddress & USB_TYPE_MASK) == USB_DIR_OUT && 1073 if (usb_endpoint_dir_out(endpoint) &&
1074 usb_endpoint_xfer_bulk(endpoint)) { 1074 usb_endpoint_xfer_bulk(endpoint)) {
1075 bulk_out_ep = endpoint->bEndpointAddress; 1075 bulk_out_ep = endpoint->bEndpointAddress;
1076 } else { 1076 } else {