On Wed, 26 Feb 2003, David Brownell wrote:

> Alan Stern wrote:
> > That sounds like you're saying the macros don't belong in usb.h at all.  
> > Shall I send in a patch that takes them out?
> 
> I think that'd be a good solution.  Or maybe just put them in "hcd.h".

Here you go.

Alan Stern
===== include/linux/usb.h 1.128 vs edited =====
--- 1.128/include/linux/usb.h   Tue Feb 18 19:18:58 2003
+++ edited/include/linux/usb.h  Wed Feb 26 16:29:24 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)
 
 /* -------------------------------------------------------------------------- */
 
===== drivers/usb/core/hcd.h 1.44 vs edited =====
--- 1.44/drivers/usb/core/hcd.h Sun Feb 16 08:48:01 2003
+++ edited/drivers/usb/core/hcd.h       Wed Feb 26 16:28:52 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))
+#define usb_rcvdefctrl(dev)            ((PIPE_CONTROL << 30) | USB_DIR_IN)
+
 /*-------------------------------------------------------------------------*/
 
 /*

Reply via email to