From 1321122774add144ab42a3bcf9d3900be5766cbd Mon Sep 17 00:00:00 2001 From: Serhii Voloshynov Date: Tue, 27 Sep 2022 13:30:30 +0300 Subject: remove duplicate has-radio --- io-module/mts-io.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/io-module/mts-io.c b/io-module/mts-io.c index b8b9c94..7c33ea4 100644 --- a/io-module/mts-io.c +++ b/io-module/mts-io.c @@ -1233,10 +1233,10 @@ mts_id_eeprom_load(void) } } } - if (hw_version_str != HW_VERSION_MTCPM_0_0) { - attr_blength += sizeof mtcpm_has_radio_attribute; - need_append = 1; - } + if (strncmp(hw_version_str,HW_VERSION_MTCPM_DASH,strlen(HW_VERSION_MTCPM_DASH))!=0) { + attr_blength += sizeof mtcpm_has_radio_attribute; + need_append = 1; + } if(DEVICE_CAPA(id_eeprom.capa, CAPA_WIFI)) { attr_blength += sizeof mtcpm_wifi_bt_attributes; need_append = 1; @@ -1249,7 +1249,7 @@ mts_id_eeprom_load(void) freelater = all_attrs = kmalloc(attr_blength,GFP_KERNEL); current_count = current_blength/(sizeof (struct attribute *)); memcpy(all_attrs,mtcpm_platform_attributes,current_blength); - if(hw_version_str != HW_VERSION_MTCPM_0_0) { + if (strncmp(hw_version_str,HW_VERSION_MTCPM_DASH,strlen(HW_VERSION_MTCPM_DASH))!=0) { log_info("Adding has_radio to mts-io driver"); memcpy(all_attrs + current_count,mtcpm_has_radio_attribute,sizeof mtcpm_has_radio_attribute); current_count += sizeof mtcpm_has_radio_attribute / (sizeof (struct attribute *)); -- cgit v1.2.3