summaryrefslogtreecommitdiff
path: root/io-module/mts-io.c
diff options
context:
space:
mode:
authorJeff Hatch <jhatch@multitech.com>2020-11-20 13:51:12 -0600
committerJohn Klug <john.klug@multitech.com>2020-11-23 14:22:45 -0600
commit90075ae2b50c4342dff880085f7342cb961456d5 (patch)
tree4e152fd464d1c548c479bc4074cc2097a5b2a560 /io-module/mts-io.c
parentfebfbaa141125c24d3a40e17034261c5354a0973 (diff)
downloadmts-io-90075ae2b50c4342dff880085f7342cb961456d5.tar.gz
mts-io-90075ae2b50c4342dff880085f7342cb961456d5.tar.bz2
mts-io-90075ae2b50c4342dff880085f7342cb961456d5.zip
Fix cleanup of supercap worker so that it doesn't cause kernel panic during unloading mts-io during normal operation, there was missing lock/unlock of mts-io mutex
Diffstat (limited to 'io-module/mts-io.c')
-rw-r--r--io-module/mts-io.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 83c3ddf..6c14a74 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -1255,6 +1255,12 @@ static void __exit mts_io_exit(void)
gpio_free(pin->pin.gpio);
cleanup_buttons();
+
+ //cleanup supercap monitor worker if SUPERCAP CAPA is true
+ if(DEVICE_CAPA(id_eeprom.capa, CAPA_SUPERCAP)) {
+ cleanup_supercap_worker();
+ }
+
cleanup();
if (DEVICE_CAPA(id_eeprom.capa, CAPA_LORA) && attr_group_lora) {
mts_teardown_lora_port();