How to port a legacy device driver to a new Linux platform?