drivers: sensors: Fix log module registration

All sensors were using legacy log module registeration method
where LOG_LEVEL was defined before registeration. This method
was error prone as it requires preserving includes order.

Replaced with LOG_MODULE_REGISTER(foo, level).

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2019-10-11 12:40:57 +02:00 committed by Maureen Helm
commit ac417abdf0
99 changed files with 116 additions and 228 deletions

View file

@ -9,8 +9,7 @@
#include <sys/__assert.h>
#include <logging/log.h>
#define LOG_LEVEL CONFIG_SENSOR_LOG_LEVEL
LOG_MODULE_REGISTER(FXAS21002);
LOG_MODULE_REGISTER(FXAS21002, CONFIG_SENSOR_LOG_LEVEL);
/* Sample period in microseconds, indexed by output data rate encoding (DR) */
static const u32_t sample_period[] = {