Commit 8db20c2e authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[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.
parent 69d42f24
......@@ -254,6 +254,10 @@ extern void usb_set_maxpacket(struct usb_device *dev);
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)
/*-------------------------------------------------------------------------*/
/*
......
......@@ -960,8 +960,6 @@ static inline unsigned int __create_pipe(struct usb_device *dev, unsigned int en
#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)
/* -------------------------------------------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment