dinput: Simplify the code that finds the offset of the given linux event.