A federal judge has reinstated Hampton Dellinger as head of the Office of Special Counsel (OSC) after President Donald Trump attempted to fire him.