Number of Linux driver wrappers included this more or less identical function, so lets add a new helper file to be able to share some more code between the driver wrappers.