Messages in this thread | | | From | Bjørn Mork <> | Subject | Re: [PATCH 1/3] usb: cp210x: Corrected USB request type definitions | Date | Thu, 03 May 2012 10:58:31 +0200 |
| |
Preston Fick <pffick@gmail.com> writes:
> diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c > index ec30f95..e67ccf3 100644 > --- a/drivers/usb/serial/cp210x.c > +++ b/drivers/usb/serial/cp210x.c > @@ -188,8 +188,10 @@ static struct usb_serial_driver * const serial_drivers[] = { > }; > > /* Config request types */ > -#define REQTYPE_HOST_TO_DEVICE 0x41 > -#define REQTYPE_DEVICE_TO_HOST 0xc1 > +#define REQTYPE_HOST_TO_INTERFACE 0x41 > +#define REQTYPE_INTERFACE_TO_HOST 0xc1 > +#define REQTYPE_HOST_TO_DEVICE 0x40 > +#define REQTYPE_DEVICE_TO_HOST 0xc0
Any particular reason you need to define these instead of just using the standard flags from linux/usb/ch9.h directly in the requests?:
(USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT) (USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_IN) (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT) (USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN)
If nothing else, using those from the beginning would have avoided the mis-labelling you are fixing up.
Bjørn -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |