On Mon, Nov 25, 2002 at 09:30:49PM -0600, Josh Myer wrote: > This is probably a stupid question. Any hints on how to elegantly deal > with 2.4 vs 2.5 usb_submit_urb arguments? For the moment (hack hack hack) > i've got[1]: > > #ifdef EV_SYN > if(usb_submit_urb(kbtab->irq, GFP_KERNEL)) > return -EIO; > #else > if(usb_submit_urb(kbtab->irq)) > return -EIO; > #endif > > But i'm guessing there's some official way to tell between the two? Or > should i just give up hope and do two .c's, one for 2.4 and the other for > 2.5?
Just give up hope and have two .c files :) There are more differences between the two kernels than just this function, so in the end you're better off with two files, than trying to maintain a #ifdef hell. Although a backport wrapper like Randy suggested is also a good way to do things. What driver are you doing this for, and why isn't it in the main kernel trees where you would not have to worry about this kind of stuff? > Thanks in advance, > > [1] the following was tempting but excessively clever and evil: > if(usb_submit_urb(kbtab->irq > #ifdef EV_SYN > , GFP_KERNEL > #endif > )) > return -EIO; Any programmer who has to maintain this would be cursing your name very quickly :) thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
