On Mon, 25 Nov 2002, Greg KH wrote: > 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. >
I was noticing that. Some changes in non-opaque structs, which makes life difficult. I'll just do two .c's. > Although a backport wrapper like Randy suggested is also a good way to > do things. > See above. > 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? > That crappy-tablet driver i posted about a month ago as a first-revision. I'm finally using 2.5.44 (this was critical point on the graph of features-to-time; that is, it's probably the last stable linus kernel for awhile =) so I needed to port it up. > Any programmer who has to maintain this would be cursing your name very > quickly :) > This is why i didn't use it =) > 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
