On Thu, 2 Feb 2006, Doug Sutherland wrote: > I've been looking at the differences between the 2.4 and 2.6 gadget > serial drivers and there don't appear to be that many significant > differences (outside of the new support for the CDC-ACM). There are a > few TTY functions that aren't included in 2.4 (i.e. alloc_tty_driver(), > tty_set_operations(), and put_tty_driver()), but it looks like these can > easily be coded manually. > > The other main difference I see is the way the spinlock_t structure is > passed to the spinlock functions. In the 2.4 version of the gadget > serial driver, this structure is passed by value: > > spin_lock_irqsave( dev-dev_lock, flags ); > > In the 2.6 version, it seems to be passed by reference: > > spin_lock_irqsave(&dev->dev_lock, flags);
No. In both cases the structure is passed by reference. If the 2.4 version appears to be by value, it must be that dev->dev_lock is a pointer to a spinlock stucture. Or else the code is just plain wrong. > I don't think I really understand the difference here and the 2.6 code > isn't always consistent in this regard. Yes it is. spin_lock_irqsave _always_ takes a pointer to a spinlock structure. > Does anyone know what is going > on with this spinlock issue? Is there a significant difference between > 2.4 and 2.6 with regard to the spinlock processing? I see the spinlock.h > files are very different between the two versions. Is this a real issue > for my backporting of the gadget driver? No, it's not a real issue. Alan Stern ------------------------------------------------------- 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&kid=103432&bid=230486&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel