From 24c012065ca7a764e1e51a9cfc4422d649cd2851 Mon Sep 17 00:00:00 2001 From: Mike Fiore Date: Wed, 10 Sep 2014 11:55:38 -0500 Subject: rename all "mtdc_*" variables to "mtac_*" --- io-module/mts_io.c | 34 +++++++++++++++++----------------- io-module/mts_io.h | 8 ++++---- io-module/spi.c | 12 ++++++------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/io-module/mts_io.c b/io-module/mts_io.c index 2ecc636..9adfd12 100644 --- a/io-module/mts_io.c +++ b/io-module/mts_io.c @@ -98,7 +98,7 @@ static DEFINE_MUTEX(mts_io_mutex); #include "spi.c" /* accessory card support */ -#include "mtdc_gpiob.c" +#include "mtac_gpiob.c" #include "mtac_mfser.c" /* telit radio reset handling */ @@ -437,7 +437,7 @@ static bool add_accessory_card_attributes(int slot) if (slot == 1) { switch (mts_ap1_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: card_attrs_size = ap1_gpio_attributes_size; card_attrs = ap1_gpio_attributes; break; @@ -451,7 +451,7 @@ static bool add_accessory_card_attributes(int slot) } } else if (slot == 2) { switch (mts_ap2_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: card_attrs_size = ap2_gpio_attributes_size; card_attrs = ap2_gpio_attributes; break; @@ -502,7 +502,7 @@ static bool mts_ap_eeprom_load(void) log_info("accessory card 1 product-id: %.32s", ap1_eeprom.product_id); log_info("accessory card 1 device-id: %.32s", ap1_eeprom.device_id); log_info("accessory card 1 hw-version: %.32s", ap1_eeprom.hw_version); - if (strncmp(ap1_eeprom.product_id, PRODUCT_ID_MTDC_ETH, strlen(PRODUCT_ID_MTDC_ETH)) == 0) { + if (strncmp(ap1_eeprom.product_id, PRODUCT_ID_MTAC_ETH, strlen(PRODUCT_ID_MTAC_ETH)) == 0) { log_info("accessory card 1 mac-addr: %02X:%02X:%02X:%02X:%02X:%02X", ap1_eeprom.mac_addr[0], ap1_eeprom.mac_addr[1], @@ -527,7 +527,7 @@ static bool mts_ap_eeprom_load(void) log_info("accessory card 2 product-id: %.32s", ap2_eeprom.product_id); log_info("accessory card 2 device-id: %.32s", ap2_eeprom.device_id); log_info("accessory card 2 hw-version: %.32s", ap2_eeprom.hw_version); - if (strncmp(ap2_eeprom.product_id, PRODUCT_ID_MTDC_ETH, strlen(PRODUCT_ID_MTDC_ETH)) == 0) { + if (strncmp(ap2_eeprom.product_id, PRODUCT_ID_MTAC_ETH, strlen(PRODUCT_ID_MTAC_ETH)) == 0) { log_info("accessory card 2 mac-addr: %02X:%02X:%02X:%02X:%02X:%02X", ap2_eeprom.mac_addr[0], ap2_eeprom.mac_addr[1], @@ -715,22 +715,22 @@ static int __init mts_io_init(void) } if (accessory_card_capable) { - mts_ap1_product_id = MTDC_NONE; - mts_ap2_product_id = MTDC_NONE; + mts_ap1_product_id = MTAC_NONE; + mts_ap2_product_id = MTAC_NONE; if (mts_ap_eeprom_load()) { // handle both slots, but do slot 1 first // probably need special handling if both cards are the same type if (have_accessory_card_slot_1) { // more elegant way to handle this? - if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) { - mts_ap1_product_id = MTDC_GPIOB_0_0; + if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTAC_GPIOB)) { + mts_ap1_product_id = MTAC_GPIOB_0_0; } else if (strstr(ap1_eeprom.product_id, PRODUCT_ID_MTAC_MFSER)) { mts_ap1_product_id = MTAC_MFSER_0_0; } switch(mts_ap1_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: log_info("loading GPIO accessory card in slot 1"); if (! add_accessory_card_attributes(1)) { log_error("failed to load GPIO accessory card in slot 1"); @@ -775,15 +775,15 @@ static int __init mts_io_init(void) if (have_accessory_card_slot_2) { // more elegant way to handle this? - if (strstr(ap2_eeprom.product_id, PRODUCT_ID_MTDC_GPIOB)) { - mts_ap2_product_id = MTDC_GPIOB_0_0; + if (strstr(ap2_eeprom.product_id, PRODUCT_ID_MTAC_GPIOB)) { + mts_ap2_product_id = MTAC_GPIOB_0_0; } else if (strstr(ap2_eeprom.product_id, PRODUCT_ID_MTAC_MFSER)) { mts_ap2_product_id = MTAC_MFSER_0_0; } switch(mts_ap2_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: log_info("loading GPIO accessory card in slot 2"); if (! add_accessory_card_attributes(2)) { log_error("failed to load GPIO accessory card in slot 2"); @@ -953,7 +953,7 @@ error2: if (have_accessory_card_slot_1) { switch (mts_ap1_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: spi_unregister_driver(&mts_spi_ap1_dout_driver); spi_unregister_driver(&mts_spi_ap1_din_driver); spi_unregister_driver(&mts_spi_ap1_adc_driver); @@ -966,7 +966,7 @@ error2: if (have_accessory_card_slot_2) { switch (mts_ap2_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: spi_unregister_driver(&mts_spi_ap2_dout_driver); spi_unregister_driver(&mts_spi_ap2_din_driver); spi_unregister_driver(&mts_spi_ap2_adc_driver); @@ -1006,7 +1006,7 @@ static void __exit mts_io_exit(void) if (have_accessory_card_slot_1) { switch (mts_ap1_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: spi_unregister_driver(&mts_spi_ap1_dout_driver); spi_unregister_driver(&mts_spi_ap1_din_driver); spi_unregister_driver(&mts_spi_ap1_adc_driver); @@ -1019,7 +1019,7 @@ static void __exit mts_io_exit(void) if (have_accessory_card_slot_2) { switch (mts_ap2_product_id) { - case MTDC_GPIOB_0_0: + case MTAC_GPIOB_0_0: spi_unregister_driver(&mts_spi_ap2_dout_driver); spi_unregister_driver(&mts_spi_ap2_din_driver); spi_unregister_driver(&mts_spi_ap2_adc_driver); diff --git a/io-module/mts_io.h b/io-module/mts_io.h index c76471c..b91423e 100644 --- a/io-module/mts_io.h +++ b/io-module/mts_io.h @@ -48,9 +48,9 @@ struct device_attribute _dev_name = { \ #define PRODUCT_ID_MTOCGD "MTOCGD" #define PRODUCT_ID_MTR2D2 "MTR2D2" -#define PRODUCT_ID_MTDC_GPIOB "MTDC-GPIOB" +#define PRODUCT_ID_MTAC_GPIOB "MTAC-GPIOB" #define PRODUCT_ID_MTAC_MFSER "MTAC-MFSER" -#define PRODUCT_ID_MTDC_ETH "MTDC-ETH" +#define PRODUCT_ID_MTAC_ETH "MTAC-ETH" #define HW_VERSION_MTCBA2_2_0 "MTCBA2-2.0" #define HW_VERSION_MTCDP_0_0 "MTCDP-0.0" @@ -78,8 +78,8 @@ enum { }; enum { - MTDC_NONE, - MTDC_GPIOB_0_0, + MTAC_NONE, + MTAC_GPIOB_0_0, MTAC_MFSER_0_0, }; diff --git a/io-module/spi.c b/io-module/spi.c index df663ae..e652b90 100644 --- a/io-module/spi.c +++ b/io-module/spi.c @@ -602,7 +602,7 @@ static int mts_spi_ap1_dout_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 1 digital outputs not available"); return -ENODEV; } @@ -648,7 +648,7 @@ static int mts_spi_ap1_din_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 1 digital inputs not available"); return -ENODEV; } @@ -691,7 +691,7 @@ static int mts_spi_ap1_adc_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_1 || mts_ap1_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 1 analog to digital not available"); return -ENODEV; } @@ -735,7 +735,7 @@ static int mts_spi_ap2_dout_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 2 digital outputs not available"); return -ENODEV; } @@ -781,7 +781,7 @@ static int mts_spi_ap2_din_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 2 digital inputs not available"); return -ENODEV; } @@ -824,7 +824,7 @@ static int mts_spi_ap2_adc_probe(struct spi_device *spi) { int tmp; - if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTDC_GPIOB_0_0) { + if (! have_accessory_card_slot_2 || mts_ap2_product_id != MTAC_GPIOB_0_0) { log_error("accessory card 2 analog to digital not available"); return -ENODEV; } -- cgit v1.2.3