projects
/
elmcan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
598aacb
)
Style: Move elm327_is_ready_char() further down to where it is used
author
norly
<ny-git@enpas.org>
Tue, 19 Feb 2019 21:56:48 +0000
(22:56 +0100)
committer
norly
<ny-git@enpas.org>
Tue, 19 Feb 2019 21:56:48 +0000
(22:56 +0100)
module/elmcan.c
patch
|
blob
|
history
diff --git
a/module/elmcan.c
b/module/elmcan.c
index 8864196c96987a7bfa2e958dbeb8e143bab148ab..894bfacbee0dbe06cd681fe8d1bd5334dade83e1 100644
(file)
--- 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) *
************************************************************************/
* (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;
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);
static void elm327_drop_bytes(struct elmcan *elm, int i)
{
memmove(&elm->rxbuf[0], &elm->rxbuf[i], sizeof(elm->rxbuf) - i);