On Wed, Feb 25, 2009 at 06:51:40AM +0000, Martin Willms wrote: > Yes, you are right. usb_register is called right at the beginning of the init > function. Afterwards I am doing my initialisations (allocating buffers, > starting kernel thread, ...). > > Is it OK to call the usb_register right at the end of the init function? It sounds like it has to be. When ever you pass a function pointer to the kernel, everything had better be set up for those functions to be called at that point in time. That's the way everything works. > In this case I would have to free up all allocated resources, if > registering will fail, but I think that you are right that this will > be the correct way to do this. That's not a big problem, and is the correct way to work. > Up to now our driver is not part of the kernel. I am not shure, if it > would help anyone as it only works with our devices. But maybe it > would be a good idea to make it part of the new "scrap" tree of kernel > modules. I will think about it. We take all kernel drivers. Seriously, if it builds, we take it (actually, we take stuff that doesn't build, but don't tell anyone...) There are all sorts of benifits of being in the kernel tree, including api changes are done for you, code cleanups are done for you, bug fixes are done for you, distros automatically support your driver, your users don't need to download anything separately and try to build it, etc. I can do all the work of getting it into the tree if you want me to. It's what I do all the time for lots of drivers, just point me at the source and I'll take care of the rest. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html