ChangeSet 1.1087.1.2, 2003/02/26 16:15:42-08:00, stern@rowland.harvard.edu [PATCH] Trivial patch for usb.h The usb_snddefctrl and usb_rcvdefctrl macros are wrong. This hasn't shown up until now because usb_rcvdefctrl isn't used anywhere at all, and usb_snddefctrl is used exactly once (in core/usb.c). This patch fixes the macros and moves them to hcd.h. drivers/usb/core/hcd.h | 4 ++++ include/linux/usb.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/core/hcd.h b/drivers/usb/core/hcd.h --- a/drivers/usb/core/hcd.h Fri Feb 28 14:49:00 2003 +++ b/drivers/usb/core/hcd.h Fri Feb 28 14:49:00 2003 @@ -254,6 +254,10 @@ extern void usb_destroy_configuration(struct usb_device *dev); extern int usb_set_address(struct usb_device *dev); +/* use these only before the device's address has been set */ +#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30) | __create_pipe(dev,0)) +#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | __create_pipe(dev,0) | USB_DIR_IN) + /*-------------------------------------------------------------------------*/ /* diff -Nru a/include/linux/usb.h b/include/linux/usb.h --- a/include/linux/usb.h Fri Feb 28 14:49:00 2003 +++ b/include/linux/usb.h Fri Feb 28 14:49:00 2003 @@ -960,8 +960,6 @@ #define usb_rcvbulkpipe(dev,endpoint) ((PIPE_BULK << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) #define usb_sndintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint)) #define usb_rcvintpipe(dev,endpoint) ((PIPE_INTERRUPT << 30) | __create_pipe(dev,endpoint) | USB_DIR_IN) -#define usb_snddefctrl(dev) ((PIPE_CONTROL << 30)) -#define usb_rcvdefctrl(dev) ((PIPE_CONTROL << 30) | USB_DIR_IN) /* -------------------------------------------------------------------------- */