Don't register device modules if not needed

Change-Id: I96143dc861dfeb8458b87495d6b780cf80209050
Merge "Don't register device modules if not needed"