From: Uwe Hermann Date: Fri, 21 Jul 2017 16:20:14 +0000 (+0200) Subject: drivers: Consistently make LOG_PREFIX the first item after #includes. X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=commitdiff_plain;h=f272d7ddc0ac67f07ae3e2ac13e0d8f386232d41 drivers: Consistently make LOG_PREFIX the first item after #includes. --- diff --git a/src/hardware/asix-sigma/protocol.h b/src/hardware/asix-sigma/protocol.h index 2c54dfa1..40206342 100644 --- a/src/hardware/asix-sigma/protocol.h +++ b/src/hardware/asix-sigma/protocol.h @@ -30,6 +30,8 @@ #include #include "libsigrok-internal.h" +#define LOG_PREFIX "asix-sigma" + /* * Triggers are not working in this implementation. Stop claiming * support for the feature which effectively is not available, until @@ -38,8 +40,6 @@ */ #define ASIX_SIGMA_WITH_TRIGGER 0 -#define LOG_PREFIX "asix-sigma" - #define USB_VENDOR 0xa600 #define USB_PRODUCT 0xa000 #define USB_DESCRIPTION "ASIX SIGMA" diff --git a/src/hardware/hung-chang-dso-2100/protocol.h b/src/hardware/hung-chang-dso-2100/protocol.h index f7268f3b..11de7b72 100644 --- a/src/hardware/hung-chang-dso-2100/protocol.h +++ b/src/hardware/hung-chang-dso-2100/protocol.h @@ -26,6 +26,7 @@ #include "libsigrok-internal.h" #define LOG_PREFIX "hung-chang-dso-2100" + #define MAX_RETRIES 4 #define NUM_CHANNELS 2 diff --git a/src/hardware/motech-lps-30x/protocol.h b/src/hardware/motech-lps-30x/protocol.h index 99e453eb..53aa0325 100644 --- a/src/hardware/motech-lps-30x/protocol.h +++ b/src/hardware/motech-lps-30x/protocol.h @@ -26,11 +26,11 @@ #include #include "libsigrok-internal.h" +#define LOG_PREFIX "motech-lps-30x" + SR_PRIV int lps_process_status(struct sr_dev_inst *sdi, int stat); SR_PRIV int lps_send_req(struct sr_serial_dev_inst *serial, const char *fmt, ...); -#define LOG_PREFIX "motech-lps-30x" - #define LINELEN_MAX 50 /**< Max. line length for requests */ #define REQ_TIMEOUT_MS 250 /**< Timeout [ms] for single request. */ diff --git a/src/hardware/sysclk-lwla/protocol.h b/src/hardware/sysclk-lwla/protocol.h index 23c2728a..0db4bc79 100644 --- a/src/hardware/sysclk-lwla/protocol.h +++ b/src/hardware/sysclk-lwla/protocol.h @@ -20,14 +20,14 @@ #ifndef LIBSIGROK_HARDWARE_SYSCLK_LWLA_PROTOCOL_H #define LIBSIGROK_HARDWARE_SYSCLK_LWLA_PROTOCOL_H -#define LOG_PREFIX "sysclk-lwla" - #include #include #include #include #include +#define LOG_PREFIX "sysclk-lwla" + /* Maximum configurable sample count limit. * Due to compression, there is no meaningful hardware limit the driver * could report. So this value is less than 2^64-1 for no reason other diff --git a/src/hardware/yokogawa-dlm/protocol.h b/src/hardware/yokogawa-dlm/protocol.h index ac0f4f1b..dae0477c 100644 --- a/src/hardware/yokogawa-dlm/protocol.h +++ b/src/hardware/yokogawa-dlm/protocol.h @@ -31,6 +31,7 @@ #include "protocol_wrappers.h" #define LOG_PREFIX "yokogawa-dlm" + #define MAX_INSTRUMENT_VERSIONS 8 #define RECEIVE_BUFFER_SIZE 4096