Porting IO driver code back to 32-bit calling conventions