aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-02-24 12:54:47 +0100
committerGuido Guenther <agx@bogon.sigxcpu.org>2007-02-24 12:54:47 +0100
commit58a707da4cbb52fce6ff1359e50af80876032e88 (patch)
tree3cf7cbd8b2e49ec006ef962abc1b2cbc3d044516
parent7ff8a12bf13a82d3427555bebfb0fd8a94f751ed (diff)
fix usage of CTRL_USB_GET_TIMEOUT
-rw-r--r--at76c503.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/at76c503.c b/at76c503.c
index acb1634..4a52a9f 100644
--- a/at76c503.c
+++ b/at76c503.c
@@ -51,13 +51,6 @@
#include "at76c503.h"
-/* timeout in seconds for the usb_control_msg in get_cmd_status
- * and set_card_command
- */
-#ifndef USB_CTRL_GET_TIMEOUT
-# define USB_CTRL_GET_TIMEOUT 5
-#endif
-
/* number of endpoints of an interface */
#define NUM_EP(intf) (intf)->altsetting[0].desc.bNumEndpoints
#define EP(intf,nr) (intf)->altsetting[0].endpoint[(nr)].desc
@@ -717,7 +710,7 @@ static int at76c503_remap(struct usb_device *udev)
ret = usb_control_msg(udev, usb_sndctrlpipe(udev,0),
0x0a, INTERFACE_VENDOR_REQUEST_OUT,
0, 0,
- NULL, 0, HZ * USB_CTRL_GET_TIMEOUT);
+ NULL, 0, USB_CTRL_GET_TIMEOUT);
if (ret < 0)
return ret;
@@ -733,7 +726,7 @@ static int get_op_mode(struct usb_device *udev)
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
0x33, INTERFACE_VENDOR_REQUEST_IN,
0x01, 0,
- &op_mode, 1, HZ * USB_CTRL_GET_TIMEOUT);
+ &op_mode, 1, USB_CTRL_GET_TIMEOUT);
if(ret < 0)
return ret;
return op_mode;
@@ -746,7 +739,7 @@ static inline int load_ext_fw_block(struct usb_device *udev,
return usb_control_msg(udev, usb_sndctrlpipe(udev,0),
0x0e, DEVICE_VENDOR_REQUEST_OUT,
0x0802, i,
- buf, bsize, HZ * USB_CTRL_GET_TIMEOUT);
+ buf, bsize, USB_CTRL_GET_TIMEOUT);
}
static inline int get_hw_cfg_rfmd(struct usb_device *udev,
@@ -755,7 +748,7 @@ static inline int get_hw_cfg_rfmd(struct usb_device *udev,
return usb_control_msg(udev, usb_rcvctrlpipe(udev,0),
0x33, INTERFACE_VENDOR_REQUEST_IN,
((0x0a << 8) | 0x02), 0,
- buf, buf_size, HZ * USB_CTRL_GET_TIMEOUT);
+ buf, buf_size, USB_CTRL_GET_TIMEOUT);
}
/* Intersil boards use a different "value" for GetHWConfig requests */
@@ -766,7 +759,7 @@ int get_hw_cfg_intersil(struct usb_device *udev,
return usb_control_msg(udev, usb_rcvctrlpipe(udev,0),
0x33, INTERFACE_VENDOR_REQUEST_IN,
((0x09 << 8) | 0x02), 0,
- buf, buf_size, HZ * USB_CTRL_GET_TIMEOUT);
+ buf, buf_size, USB_CTRL_GET_TIMEOUT);
}
/* Get the hardware configuration for the adapter and place the appropriate
@@ -872,7 +865,7 @@ static inline int get_mib(struct usb_device *udev,
return usb_control_msg(udev, usb_rcvctrlpipe(udev,0),
0x33, INTERFACE_VENDOR_REQUEST_IN,
mib << 8, 0,
- buf, buf_size, HZ * USB_CTRL_GET_TIMEOUT);
+ buf, buf_size, USB_CTRL_GET_TIMEOUT);
}
static inline int get_cmd_status(struct usb_device *udev,
@@ -881,7 +874,7 @@ static inline int get_cmd_status(struct usb_device *udev,
return usb_control_msg(udev, usb_rcvctrlpipe(udev,0),
0x22, INTERFACE_VENDOR_REQUEST_IN,
cmd, 0,
- cmd_status, 40, HZ * USB_CTRL_GET_TIMEOUT);
+ cmd_status, 40, USB_CTRL_GET_TIMEOUT);
}
#define EXT_FW_BLOCK_SIZE 1024
@@ -945,7 +938,7 @@ static int set_card_command(struct usb_device *udev, int cmd,
0, 0,
cmd_buf,
sizeof(struct at76c503_command) + buf_size,
- HZ * USB_CTRL_GET_TIMEOUT);
+ USB_CTRL_GET_TIMEOUT);
kfree(cmd_buf);
return ret;
}
@@ -1024,7 +1017,7 @@ static int set_mib(struct at76c503 *dev, struct set_mib_buffer *buf)
0, 0,
cmd_buf,
sizeof(struct at76c503_command) + buf->size + 4,
- HZ * USB_CTRL_GET_TIMEOUT);
+ USB_CTRL_GET_TIMEOUT);
if (ret >= 0)
if ((ret=wait_completion(dev, CMD_SET_MIB)) !=
CMD_STATUS_COMPLETE) {