regmap: use less #ifdef for LOG_DEVICE

Move the checking of the LOG_DEVICE into a function to reduce the
number of #ifdefs and  ensure more of the code gets compiled/checked,
and make it easier to change this for internal debugging purposes
(such as checking >1 device).

Signed-off-by: Ben Dooks <>
Signed-off-by: Mark Brown <>
1 file changed