<p dir="ltr">Part of making an upstream patch involves collapsing those ifdefs to match the current kernel version.  That by itself should considerably simplify that function.</p>
<p dir="ltr"> - Jonathan Morton<br>
</p>