This patch makes ss->ep_int just like ep_in and ep_out for improved code symmetry and readability. It may (on some architectures) also shrink the size of the per-device data structure.
transport.c | 4 ++--
usb.c | 15 +++++++++------
usb.h | 3 ++-
3 files changed, 13 insertions, 9 deletions
Greg, please apply.
Matthew Dharm
# This is a BitKeeper generated patch for the following project:
# Project Name: greg k-h's linux 2.5 USB kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.657 -> 1.658
# drivers/usb/storage/usb.h 1.29 -> 1.30
# drivers/usb/storage/transport.c 1.70 -> 1.71
# drivers/usb/storage/usb.c 1.59 -> 1.60
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/12/08 [EMAIL PROTECTED] 1.658
# Make ep_int (in the device structure) just like ep_out and ep_in. Just
# a small cleanup.
# --------------------------------------------
#
diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
--- a/drivers/usb/storage/transport.c Sun Dec 8 16:38:45 2002
+++ b/drivers/usb/storage/transport.c Sun Dec 8 16:38:45 2002
@@ -507,7 +507,7 @@
* to make aborts/resets/timeouts work
*
* This routine always uses us->recv_intr_pipe as the pipe and
- * us->ep_int->bInterval as the interrupt interval.
+ * us->ep_bInterval as the interrupt interval.
*/
int usb_stor_interrupt_msg(struct us_data *us, void *data,
unsigned int len, unsigned int *act_len)
@@ -524,7 +524,7 @@
/* fill and submit the URB */
usb_fill_int_urb(us->current_urb, us->pusb_dev, pipe, data,
maxp, usb_stor_blocking_completion, NULL,
- us->ep_int->bInterval);
+ us->ep_bInterval);
status = usb_stor_msg_common(us);
/* store the actual length of the data transferred */
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Sun Dec 8 16:38:45 2002
+++ b/drivers/usb/storage/usb.c Sun Dec 8 16:38:45 2002
@@ -486,12 +486,11 @@
static int usb_stor_allocate_urbs(struct us_data *ss)
{
/* calculate and store the pipe values */
- ss->send_bulk_pipe = usb_sndbulkpipe(ss->pusb_dev, ss->ep_out);
- ss->recv_bulk_pipe = usb_rcvbulkpipe(ss->pusb_dev, ss->ep_in);
ss->send_ctrl_pipe = usb_sndctrlpipe(ss->pusb_dev, 0);
ss->recv_ctrl_pipe = usb_rcvctrlpipe(ss->pusb_dev, 0);
- ss->recv_intr_pipe = usb_rcvintpipe(ss->pusb_dev,
- ss->ep_int->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
+ ss->send_bulk_pipe = usb_sndbulkpipe(ss->pusb_dev, ss->ep_out);
+ ss->recv_bulk_pipe = usb_rcvbulkpipe(ss->pusb_dev, ss->ep_in);
+ ss->recv_intr_pipe = usb_rcvintpipe(ss->pusb_dev, ss->ep_int);
/* allocate the usb_ctrlrequest for control packets */
US_DEBUGP("Allocating usb_ctrlrequest\n");
@@ -729,7 +728,9 @@
USB_ENDPOINT_NUMBER_MASK;
ss->ep_out = ep_out->bEndpointAddress &
USB_ENDPOINT_NUMBER_MASK;
- ss->ep_int = ep_int;
+ ss->ep_int = ep_int->bEndpointAddress &
+ USB_ENDPOINT_NUMBER_MASK;
+ ss->ep_bInterval = ep_int->bInterval;
/* allocate the URB, the usb_ctrlrequest, and the IRQ URB */
if (usb_stor_allocate_urbs(ss))
@@ -770,7 +771,9 @@
USB_ENDPOINT_NUMBER_MASK;
ss->ep_out = ep_out->bEndpointAddress &
USB_ENDPOINT_NUMBER_MASK;
- ss->ep_int = ep_int;
+ ss->ep_int = ep_int->bEndpointAddress &
+ USB_ENDPOINT_NUMBER_MASK;
+ ss->ep_bInterval = ep_int->bInterval;
/* establish the connection to the new device */
ss->ifnum = ifnum;
diff -Nru a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h
--- a/drivers/usb/storage/usb.h Sun Dec 8 16:38:45 2002
+++ b/drivers/usb/storage/usb.h Sun Dec 8 16:38:45 2002
@@ -154,7 +154,8 @@
u8 ifnum; /* interface number */
u8 ep_in; /* bulk in endpoint */
u8 ep_out; /* bulk out endpoint */
- struct usb_endpoint_descriptor *ep_int; /* interrupt endpoint */
+ u8 ep_int; /* interrupt endpoint */
+ u8 ep_bInterval; /* interrupt interval */
/* function pointers for this device */
trans_cmnd transport; /* transport function */
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
You were using cheat codes too. You guys suck.
-- Greg to General Studebaker
User Friendly, 12/16/1997
msg09861/pgp00000.pgp
Description: PGP signature
