LWN.net Logo

Mistake

Mistake

Posted Sep 30, 2004 18:26 UTC (Thu) by hamjudo (subscriber, #363)
In reply to: Mistake by elanthis
Parent article: Driver core functions: GPL only

You can't recompile the driver if the API it requires changes or disappears when you update the kernel.

Unless you or your driver compiler tool know how to fix up the API. Look a couple stories up at remap_pfn_range(). If you follow the link to the actual patch, you'll see a temporary wrapper for maintaining the old API until the complete patch set is applied.

That class of API change lends itself to some simple heuristics. In this particular case, if the compiler complains that remap_page_range() is missing, add that 8 line inline function and recompile.

Many API changes really are that simple. Most of the more complex API transformations would still be straightforward to code in Perl, Python or the source code manipulation language of your choice. This is assuming that your goal is working code, rather than high performance code.

It is not hard work, but it is a lot of work, and people with the right skills would have to be convinced it is worth doing.

I don't believe it is worth doing at this time.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds