lkml.org 
[lkml]   [2012]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH 1/3] usb: cp210x: Corrected USB request type definitions
    Date
    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/

    \
     
     \ /
      Last update: 2012-05-03 11:41    [W:6.608 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site