of/device: Add OF style matching helper function