Fixes for kernel 2.6.38.
Also removing the debugging stuff, because we're pretty much ready to collapse to the master branch.