From ff6869f6909ae5facb05f9bfe70a52369ed433ad Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Mon, 11 Jan 2021 18:04:26 +0100 Subject: [PATCH] apix-can: remove CAN stop from cleanup() This commit will remove the call to stop the CAN controller, because freeing the CAN will stop the CAN interface already. Calling stop twice will producing the following error message: DIGIAPIX[824]: [ERROR] ldx_can_process_tx_socket: CAN network is down DIGIAPIX[824]: [ERROR] ldx_can_stop: Unexpected state 0, in can0 interface DIGIAPIX[824]: [ERROR] can0|ldx_can_thr: select error (-27|100) Signed-off-by: Mike Engel --- apix-can-examples/can-recv-example.c | 1 - apix-can-examples/can-send-example.c | 1 - 2 files changed, 2 deletions(-) diff --git a/apix-can-examples/can-recv-example.c b/apix-can-examples/can-recv-example.c index ec18ca9..58fa13c 100644 --- a/apix-can-examples/can-recv-example.c +++ b/apix-can-examples/can-recv-example.c @@ -79,7 +79,6 @@ static void cleanup(void) free(canfilter); if (can_if) { - ldx_can_stop(can_if); ldx_can_free(can_if); running = false; } diff --git a/apix-can-examples/can-send-example.c b/apix-can-examples/can-send-example.c index 95ad389..230e1ad 100644 --- a/apix-can-examples/can-send-example.c +++ b/apix-can-examples/can-send-example.c @@ -111,7 +111,6 @@ void ms_sleep(uint32_t ms) static void cleanup(void) { if (can_if) { - ldx_can_stop(can_if); ldx_can_free(can_if); running = false; }