Earlier, I used support for dynamic kernel modules or DKMS to distribute a Linux driver intended for several kernel versions (2.6.31-37). DKMS itself is a set of bash scripts that can automate both the assembly and rebuilding of the kernel module based on the currently installed version of Linux. You can distribute drivers as RPM or DEB files that contain the driver source, DKMS scripts, and, optionally, binary versions of the driver associated with specific kernel versions.
source share