Comparison function for comparing two device objects.
a device
a different device
negative, 0 or positive