summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2019-02-19 22:56:48 +0100
committernorly <ny-git@enpas.org>2019-02-19 22:56:48 +0100
commit0b1d25e2666db847f3096227ac0b335e197c9d58 (patch)
tree34937c5cbb8424388d4c0e0b4a48df4f081b89ec
parent598aacbfeb201ea7f2ceb404952369d544b615c9 (diff)
Style: Move elm327_is_ready_char() further down to where it is used
-rw-r--r--module/elmcan.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 8864196..894bfac 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -374,15 +374,6 @@ static inline void elm327_hw_failure(struct elmcan *elm)
* (assumes elm->lock taken) *
************************************************************************/
-static bool elm327_is_ready_char(char c)
-{
- /* Bits 0xc0 are sometimes set (randomly), hence the mask.
- * Probably bad hardware.
- */
- return (c & 0x3f) == ELM327_READY_CHAR;
-}
-
-
static void elm327_parse_error(struct elmcan *elm, int len)
{
struct can_frame frame;
@@ -680,6 +671,15 @@ static void elm327_handle_prompt(struct elmcan *elm)
}
+static bool elm327_is_ready_char(char c)
+{
+ /* Bits 0xc0 are sometimes set (randomly), hence the mask.
+ * Probably bad hardware.
+ */
+ return (c & 0x3f) == ELM327_READY_CHAR;
+}
+
+
static void elm327_drop_bytes(struct elmcan *elm, int i)
{
memmove(&elm->rxbuf[0], &elm->rxbuf[i], sizeof(elm->rxbuf) - i);