Oliver,
Thanks for the response 

In usb_skeletoc.c sample driver, when I look into the probe function,
When trying for bulk out endpoint,  I find the if condition checking for 
USB_DIR_IN which I guess is wrong 
and it should be USB_DIR_OUT.

code section
------------
                if (!dev->bulk_out_endpointAddr &&
                    !(endpoint->bEndpointAddress & USB_DIR_IN) &&
                    ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK)
                                        == USB_ENDPOINT_XFER_BULK)) {
                        /* we found a bulk out endpoint */
                        dev->bulk_out_endpointAddr = endpoint->bEndpointAddress;
                }

Any comments.

Regards,
Mukund Jampala






> -----Original Message-----
> From: Oliver Neukum [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 18, 2006 1:46 PM
> To: linux-usb-devel@lists.sourceforge.net
> Cc: Mukund JB.
> Subject: Re: [linux-usb-devel] Why double locking the usb-skeleton.c
> code
> 
> 
> Am Mittwoch, 18. Januar 2006 07:58 schrieb Mukund JB.:
> > I made an attempt to understand the USB driver sample code 
> in usb-skeleton.c file /drivers/usb.
> > I found in the probe function there are two reference 
> counts being maintained.
> > One is through usb_get_dev() and the other one is kref_init().
> > Is this kind of reference count implementation not redundant?
> 
> Two different data structures are managed. Krefs are used for
> an internal data structure, usb_get_dev manages usbcore's data
> structure.
> 
>       HTH
>               Oliver
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to