The type of pc2_command is different from type declaration for gpib_interface_t and nec7210_command. It should be 'int' instead of 'ssize_t'. Seems with Ubuntu 16.04.2 HWE kernel the incompatible pointer type warning is considered as error and dkms compilation fails.