Code for a TV detective (5)
I believe the answer is:
morse
This clue is a double definition.
'code' is the first definition.
(Morse code)
'tv detective' is the second definition.
(Inspector Morse)
'for a' is the link.
(Other definitions for morse that I've seen before include "Colin Dexter's fictional detective" , "10 [SLEUTH]" , "Code using dots and dashes" , "One who enjoyed solving code" , "Kind of code" .)