summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2020-10-13 17:08:58 -0500
committerJohn Klug <john.klug@multitech.com>2020-10-16 10:09:15 -0500
commitb7b38cbf4dd607b2bfba0a0c34399d7bd35bd783 (patch)
tree89acef6a3e1f80de6265465383f1b0dfca32979f
parentace6855ee90434b77bdf99f915804584251a6ea1 (diff)
downloadmts-io-4.1.4a.tar.gz
mts-io-4.1.4a.tar.bz2
mts-io-4.1.4a.zip
4.1.4a with no-radio fix4.1.4a
-rw-r--r--io-module/mts-io.c8
-rw-r--r--io-module/mts_io_module.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/io-module/mts-io.c b/io-module/mts-io.c
index 954da63..6d0c47a 100644
--- a/io-module/mts-io.c
+++ b/io-module/mts-io.c
@@ -736,7 +736,8 @@ mts_id_eeprom_load(void)
if (is_radio_power_attr_mtcdt(ap[j])) {
log_info("Pruning radio feature from mts-io",j);
ap[j] = NULL;
- current_blength = attr_blength = j * sizeof (ap[j]);
+ current_blength = j * sizeof (ap[j]); /* Size without NULL */
+ attr_blength += sizeof (ap[j]); /* Size of attr array with NULL */
break;
}
}
@@ -748,7 +749,7 @@ mts_id_eeprom_load(void)
if(DEVICE_CAPA(id_eeprom.capa, CAPA_GPS)) {
attr_blength += sizeof mtcdt_0_1_gnss_attributes;
}
- if (current_blength+(sizeof(struct attribute *)) != attr_blength) {
+ if (current_blength+(sizeof(struct attribute *)) != attr_blength) {
freelater = all_attrs = kmalloc(attr_blength,GFP_KERNEL);
current_count = current_blength/(sizeof (struct attribute *));
memcpy(all_attrs,mtcdt_0_1_platform_attributes,current_blength);
@@ -787,7 +788,8 @@ mts_id_eeprom_load(void)
if (is_radio_power_attr_mtcdt(ap[j])) {
log_info("Pruning radio feature from mts-io",j);
ap[j] = NULL;
- current_blength = attr_blength = j * sizeof (ap[j]);
+ current_blength = j * sizeof (ap[j]); /* Size without NULL */
+ attr_blength += sizeof (ap[j]); /* Size of attr array with NULL */
break;
}
}
diff --git a/io-module/mts_io_module.h b/io-module/mts_io_module.h
index 6a84d4c..0e1b1d5 100644
--- a/io-module/mts_io_module.h
+++ b/io-module/mts_io_module.h
@@ -5,7 +5,7 @@
* MTAC cards.
*/
-#define DRIVER_VERSION "v4.1.4"
+#define DRIVER_VERSION "v4.1.4a"
#define DRIVER_AUTHOR "Multitech Systems"
#define DRIVER_DESC "MTS-IO Controller"
#define DRIVER_NAME "mts-io"