Added generic function for adding an IODevice to a device