HAL_Linux: made I2C driver more portable

this uses a typeof() to cope with different kernel data types for I2C
messages
HAL_Linux: fixed a build warning