Greg KH wrote:
On Mon, May 24, 2004 at 05:42:54PM -0400, nardelli wrote:


Nah, this is good enough. I've tweaked the patch a bit to keep from creating a big structure on the stack, and reduced the copy port logic to something a bit more readable and applied this version. I'll send it off to Linus in a day or so.

Thanks a lot for your work on this.

greg k-h

+#define COPY_PORT(dest, src) \
+ dest->read_urb = src->read_urb; \
+ dest->bulk_in_endpointAddress = src->bulk_in_endpointAddress; \
+ dest->bulk_in_buffer = src->bulk_in_buffer; \
+ dest->interrupt_in_urb = src->interrupt_in_urb; \
+ dest->interrupt_in_endpointAddress = src->interrupt_in_endpointAddress; \
+ dest->interrupt_in_buffer = src->interrupt_in_buffer;
+
+ swap_port = kmalloc(sizeof(*swap_port), GFP_KERNEL);
+ if (!swap_port)
+ return -ENOMEM;
+ COPY_PORT(swap_port, serial->port[0]);
+ COPY_PORT(serial->port[0], serial->port[1]);
+ COPY_PORT(serial->port[1], swap_port);
+ kfree(swap_port);
return 0;
}
-

That's definitely less error prone as well.

BTW - I appreciate the time that you have put into this, and especially the constructive comments and patience that you had regarding patches that I submitted.

--
Joe Nardelli
[EMAIL PROTECTED]


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to